예제 #1
0
 // Start is called before the first frame update
 void Awake()
 {
     if (FindObjectOfType <UI_Tweens>())
     {
         UI_Tweens won = FindObjectOfType <UI_Tweens>();
         Debug.Log("Found UI Tween object in playerTurn: " + won.name);
         won.currentState = UI_Tweens.State.nothing;
         won.gameObject.SetActive(false);
     }
 }
    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();
    }