예제 #1
0
    private IEnumerator SetupBattle()
    {
        //BattleUnit.Setup for each field Unit
        playerUnit1.Setup();
        playerUnit2.Setup();
        playerUnit3.Setup();
        playerUnit4.Setup();
        enemyUnit1.Setup();
        enemyUnit2.Setup();
        enemyUnit3.Setup();



// Sets Dynamic object data inside hud for each object
        playerHud.SetDataPlayer1(playerUnit1.Char);
        playerHud.SetDataPlayer2(playerUnit2.Char);
        playerHud.SetDataPlayer3(playerUnit3.Char);
        playerHud.SetDataPlayer4(playerUnit4.Char);
        playerHud.SetDataEnemy1(enemyUnit1.Char);
        playerHud.SetDataEnemy2(enemyUnit2.Char);
        playerHud.SetDataEnemy3(enemyUnit3.Char);

        playerHud.SetMoveNames(playerUnit1.Char.Moves);


//controls encounter-notifcation text
        yield return(NotificationBox.TypeDialog($"A Wild {enemyUnit1.Char.Base.Name}, {enemyUnit2.Char.Base.Name} and {enemyUnit3.Char.Base.Name} appeared"));

        yield return(new WaitForSeconds(1f));

        //moves Engine to state PlyaerAction
        PlayerAction();
    }