예제 #1
0
    public PlayerHealInProgress playerHealState;     // "" healing

    // Start is called before the first frame update
    void Start()
    {
        state             = BattleState.START;
        playerAttackState = PlayerAttackInProgress.NO;     // at the start of the game, the player is not attacking
        playerHealState   = PlayerHealInProgress.NO;       // "" healing
        // Debug.Log(state);
        StartCoroutine(SetupBattle());
    }
예제 #2
0
    IEnumerator PlayerHeal()
    {
        playerHealState = PlayerHealInProgress.YES;         // update state; the player is currently in a heal

        dialogueText.text = "Rockett turns to her friends.";

        yield return(new WaitForSeconds(1f));

        dialogueText.text = "Stephanie cheers.";

        yield return(new WaitForSeconds(1f));

        playerUnit.Heal(5);

        playerHUD.SetHP(playerUnit.currentHP);
        dialogueText.text = "Rockett feels renewed strength!";

        yield return(new WaitForSeconds(2f));

        state           = BattleState.ENEMYTURN;
        playerHealState = PlayerHealInProgress.NO;         // the player's heal is finished
        StartCoroutine(EnemyTurn());
    }