public override void OnEnter() { //Yay we won! if (FindObjectOfType <UI_Tweens>()) { won = FindObjectOfType <UI_Tweens>(); } won.currentState = UI_Tweens.State.full; won.MoveToPos(won.gameObject, new Vector3(won.gameObject.transform.position.x, Screen.height * 0.6f, won.gameObject.transform.position.z), 0.5f); }
public override void InitState(FSM fsm) { if (FindObjectOfType <UI_Tweens>()) { UI_Tweens won = FindObjectOfType <UI_Tweens>(); won.currentState = UI_Tweens.State.retry; won.MoveToPos(won.gameObject, won.pos, 0.3f); } base.InitState(fsm); particles.Clear(); particles = FindObjectsOfType <Particles>().ToList(); }