Exemplo n.º 1
0
    private IEnumerator WaitExecute(int time, IGameStatesPT gS, int player)
    {
        yield return(new WaitForSeconds(time));

        if (!IsEnd())
        {
            ChangeState(gS);
            if (player == 2)
            {
                transform.GetComponent <GUIControllerScriptPT>().ViewMessage("Your Turn", 1, false);
                AddPowerPoints(1);
                transform.GetComponent <GUIControllerScriptPT>().LockUnlockPowers(true, powerPoints);
            }
        }
        else
        {
            ChangeState(new IEndStatePT());
        }
    }
Exemplo n.º 2
0
 public void ChangeState(IGameStatesPT newState)
 {
     gameState = newState;
     gameState.OnStateEnter(this);
 }
Exemplo n.º 3
0
 public void Wait(int time, IGameStatesPT gS, int player)
 {
     StartCoroutine(WaitExecute(time, gS, player));
 }