Пример #1
0
 public bool SetValues(BattleCharacterController target)
 {
     if (Target == target)
     {
         return(false);
     }
     nameText.text         = target.DisplayName;
     levelText.text        = $"Lvl {target.level}";
     healthSlider.maxValue = target.HealthComponent.MaxHealth;
     healthSlider.value    = target.HealthComponent.CurrentHealth;
     target.HealthComponent.OnHealthChanged.AddListener(OnHealthChanged_Listener);
     return(true);
 }
        protected void Start_Enter()
        {
            playerBattleStation.DestroyAllSpawns();
            enemyBattleStation.DestroyAllSpawns();
            BattlePlayer = playerBattleStation.SpawnAndGetGameObject();
            BattlePlayer.HealthComponent.HealFull();
            BattleEnemy = enemyBattleStation.SpawnAndGetGameObject();
            BattleEnemy.HealthComponent.HealFull();
            HUDPlayer.SetValues(BattlePlayer);
            HUDEnemy.SetValues(BattleEnemy);
            BattleText.text = $"A wild {BattleEnemy.DisplayName} approaches...";

            FSM.ChangeStateIn(2f, FStatesBattle.PLAYERTURN);
        }
Пример #3
0
 public override void ResetValues()
 {
     Target = null;
 }