public IEnumerator BattleStart()
    {
        yield return(new WaitForSeconds(0.01f));

        yield return(StartCoroutine(textBox.Dialogue(Enemy.introDialogue)));

        currentState     = BattleState.PlayerTurn;
        PTC.currentState = PlayerTurnController.MenuStates.MainSelect;
        PTC.HelpButton.Select();
    }
示例#2
0
    public IEnumerator HealPlayer()
    {
        currentState = MenuStates.EnemyTurn;
        int targetHealth = GameControl.control.health + GameControl.control.healFactor;

        if (targetHealth > GameControl.control.maxHealth)
        {
            targetHealth = GameControl.control.maxHealth;
        }
        yield return(StartCoroutine(textBox.Dialogue("You took some time to take care of yourself.")));

        BattleController.BC.healingTouched = true;
        for (int i = GameControl.control.health; i <= targetHealth; i++)
        {
            GameControl.control.health = i;
            yield return(new WaitForEndOfFrame());
        }
        //sound effect
        yield return(new WaitForSeconds(0.2f));

        currentState = MenuStates.EnemyTurn;
        StartCoroutine(BattleController.BC.EndTurnPlayer());
    }