Ejemplo n.º 1
0
    IEnumerator StartBattle()
    {
        GameObject PlayerObj = Instantiate(PlayerPrefabObject, PlayerPos);

        PlayerCharUnit = PlayerObj.GetComponent <GameUnitScript>();

        Instantiate(EnemyPrefabObject, EnemyPos);
        EnemyCharUnit = EnemyPrefabObject.GetComponent <GameUnitScript>();


        playerHUD.TheHUD(PlayerCharUnit);
        enemyHUD.TheHUD(EnemyCharUnit);
        yield return(new WaitForSeconds(1.5f));

        CurrentState = BattleStateMachine.PlayerTurn;
        PlayerNoTurn();
    }
 public void TheHUD(GameUnitScript GameUnit)
 {
     PlayerName.text = GameUnit.UnitName;
     HP.maxValue     = GameUnit.MaximumHealth;
     HP.value        = GameUnit.CurrentHealth;
 }
Ejemplo n.º 3
0
 public void TheHUD(GameUnitScript GameUnit)
 {
     EnemyName.text   = GameUnit.UnitName;
     EnemyHP.maxValue = GameUnit.MaximumHealth;
     EnemyHP.value    = GameUnit.CurrentHealth;
 }