Ejemplo n.º 1
0
    void Update()
    {
        switch (currentGeneralState)
        {
        case generalBattleState.STARTING:
            loseWinText.SetActive(false);
            FillBattleOrder();
            bInput.ChangeButtonsText(1);
            exit.SetActive(false);
            currentGeneralState = generalBattleState.NONE;
            break;

        case generalBattleState.NONE:
            switch (currentBattleState)
            {
            case BattleStates.PLAYERTURN:
                break;

            case BattleStates.SELECTATTACKOBJECTIVE:
                attack = true;
                break;

            case BattleStates.ATTACKING:
                ManageAttacking();
                break;

            case BattleStates.SELECTABILITYTYPE:
                break;

            case BattleStates.SELECTABILITY:
                break;

            case BattleStates.SELECTABILITYOBJECTIVE:
                break;

            case BattleStates.ABILITYINPROCESS:
                doAbilityP();
                break;

            case BattleStates.DEFEND:
                ManageDefend();
                break;

            case BattleStates.ENEMYTURN:
                if (currentEnemy.Run())
                {
                    currentEnemy.transform.eulerAngles = new Vector3(0.0f, 180.0f, 0.0f);
                    EndTurn(false);
                }
                break;

            case BattleStates.WAITING:
                break;
            }
            break;
        }
    }
Ejemplo n.º 2
0
    void OnEnable()
    {
        useOfAbilities = gameObject.GetComponent <UseOfAbilities>();

        currentGeneralState = generalBattleState.STARTING;
        calculator          = new BattleCalculator();
        //marker = GameObject.Find("Marker");
        attackFinished = 0;
        startAttack    = false;
    }