using System;
using UnityEngine;

// Token: 0x0200002F RID: 47
public class Flag : MonoBehaviour
{
	// Token: 0x06000747 RID: 1863 RVA: 0x0009B0F8 File Offset: 0x000992F8
	private void Start()
	{
		this.tr = base.transform;
		this.anim = base.gameObject.GetComponent<Animator>();
		if (this.anim && this.randomize && this.anim && base.gameObject.activeSelf)
		{
			this.anim.Play(this.anim.GetCurrentAnimatorStateInfo(0).shortNameHash, 0, Random.Range(0f, 1f));
		}
	}

	// Token: 0x06000748 RID: 1864 RVA: 0x0009B180 File Offset: 0x00099380
	public void OnParticleSystemStopped()
	{
		base.gameObject.transform.SetParent(Links.x.cellar.tr);
		base.gameObject.SetActive(false);
	}

	// Token: 0x06000749 RID: 1865 RVA: 0x0009B1AD File Offset: 0x000993AD
	public void VineJump()
	{
		base.gameObject.transform.Rotate(new Vector3(0f, Random.Range(0f, 180f), 0f));
	}

	// Token: 0x0600074A RID: 1866 RVA: 0x0009B1DD File Offset: 0x000993DD
	public void AnimationDone()
	{
		this.anim.enabled = false;
	}

	// Token: 0x0600074B RID: 1867 RVA: 0x0009B1EB File Offset: 0x000993EB
	public void ReturnAnimatedText()
	{
		Links.x.cellar.ReturnanimatedText(base.gameObject.GetComponent<Animator>());
	}

	// Token: 0x0600074C RID: 1868 RVA: 0x0009B207 File Offset: 0x00099407
	public void TurnOffObject()
	{
		base.gameObject.SetActive(false);
	}

	// Token: 0x0600074D RID: 1869 RVA: 0x0009B215 File Offset: 0x00099415
	public void FXDone()
	{
		Links.x.cellar.ReturnPooledGameObject(this.id, base.gameObject);
	}

	// Token: 0x0600074E RID: 1870 RVA: 0x0009B232 File Offset: 0x00099432
	public void CloseBoroHover()
	{
		Links.x.hudControl.BoroHoverCardOff();
	}

	// Token: 0x0600074F RID: 1871 RVA: 0x0009B243 File Offset: 0x00099443
	public void ReturnToPool()
	{
		this.tr.SetParent(Links.x.cellar.tr, true);
		this.tr.gameObject.SetActive(false);
	}

	// Token: 0x06000750 RID: 1872 RVA: 0x0009B271 File Offset: 0x00099471
	public void CircleOff()
	{
		Links.x.gameplay.TurnOffSelectionCircle();
	}

	// Token: 0x06000751 RID: 1873 RVA: 0x0009B282 File Offset: 0x00099482
	public void Popup1()
	{
		Debug.Log("pop up 1 " + this.id.ToString());
		if (this.id == 0)
		{
			Links.x.dialogue.SongCompleteUIPart2();
		}
	}

	// Token: 0x06000752 RID: 1874 RVA: 0x0009B2B5 File Offset: 0x000994B5
	public void Popup2()
	{
		Debug.Log("pop up 2");
		if (this.id == 0)
		{
			base.gameObject.SetActive(false);
		}
	}

	// Token: 0x06000753 RID: 1875 RVA: 0x0009B2D5 File Offset: 0x000994D5
	public void TransitionReady()
	{
		Links.x.cameraEffects.FinishTransition(true);
	}

	// Token: 0x06000754 RID: 1876 RVA: 0x0009B2E7 File Offset: 0x000994E7
	public void TransitionDone()
	{
		Links.x.cameraEffects.FinishFade();
	}

	// Token: 0x06000755 RID: 1877 RVA: 0x0009B2F8 File Offset: 0x000994F8
	public void AnimCanvasAlphaOn()
	{
		if (!this.canvGroup)
		{
			this.canvGroup = base.gameObject.GetComponent<CanvasGroup>();
		}
		this.AnimationDone();
		this.canvGroup.alpha = 1f;
	}

	// Token: 0x06000756 RID: 1878 RVA: 0x0009B32E File Offset: 0x0009952E
	public void AnimCanvasAlphaOff()
	{
		if (!this.canvGroup)
		{
			this.canvGroup = base.gameObject.GetComponent<CanvasGroup>();
		}
		this.AnimationDone();
		this.canvGroup.alpha = 0f;
	}

	// Token: 0x06000757 RID: 1879 RVA: 0x0009B364 File Offset: 0x00099564
	public void attack()
	{
	}

	// Token: 0x06000758 RID: 1880 RVA: 0x0009B366 File Offset: 0x00099566
	public void step()
	{
	}

	// Token: 0x06000759 RID: 1881 RVA: 0x0009B368 File Offset: 0x00099568
	public void TurnOffAnimator()
	{
		Links.x.cameraEffects.cameraAnimator.enabled = false;
	}

	// Token: 0x04000A82 RID: 2690
	public string sound;

	// Token: 0x04000A83 RID: 2691
	private Transform tr;

	// Token: 0x04000A84 RID: 2692
	private Animator anim;

	// Token: 0x04000A85 RID: 2693
	private CanvasGroup canvGroup;

	// Token: 0x04000A86 RID: 2694
	public int id;

	// Token: 0x04000A87 RID: 2695
	public bool randomize;

	// Token: 0x04000A88 RID: 2696
	public Character character;
}
