コード例 #1
0
    void Update()
    {
        switch (turnState)
        {
        case Utils.TurnState.Party:
            if (enemyController.AllEnemiesDefeated() && battleController.GUIController.GuiState != Utils.GUIState.GameEnd)
            {
                Debug.Log("All enemies have been defeated");
                battleController.GUIController.GuiState = Utils.GUIState.GameEnd;
            }
            if (partyController.IsPartyTapped())
            {
                Debug.Log("Turn Switch: party to enemy");
                turnState = Utils.TurnState.Enemy;
            }
            break;

        case Utils.TurnState.Enemy:
            /*if (enemyController.AreEnemiesTapped()) {
             *  turnState = Utils.TurnState.Party;
             * }*/
            Debug.Log("Turn Switch: enemy to party");
            turnState = Utils.TurnState.Party;
            partyController.UntapParty();
            break;

        default:
            break;
        }
    }