Exemplo n.º 1
0
    void Start()
    {
        if (!DataPersistance.GameStateExists())
        {
            throw new System.InvalidProgramException("Game state don't exist!");
        }
        CurrentGameId    = DataPersistance.GetCurrentGameId();
        PopupsController = GetComponent <PopupsController>();

        if (GSP.GameState.ItsMyTurn())
        {
            if (GSP.GameState.HasNotStarted())
            {
                GameEngine.StartGame();
            }
        }

        UpdateUI();
        CheckTheTurn();

        if (GSP.GameState.GetAvailableActions().FindAll((Action obj) => obj.Type == ActionType.EndTurn).Count == 1)
        {
            EndTurnParticleSystemVisible = true;
        }
        else
        {
            EndTurnParticleSystemVisible = false;
        }
    }
Exemplo n.º 2
0
 private void Start()
 {
     currentGameId = DataPersistance.GetCurrentGameId();
     playerId      = DataPersistance.GetPlayerNickName();
     GetGameState();
 }