Пример #1
0
 public override string ToString()  //вывод информации о герое
 {
     return("Hero name:" + PlayerName.ToString() + ", Race: " + PlayerRace.ToString() + ", Sex: " + PlayerSex.ToString() + ", Age: " + PlayerAge.ToString() + ", Condition: " + PlayerCondition.ToString() + ", Max Health: " + PlayerMaxHealth.ToString() + ", Current Health: " + PlayerCurrentHealth.ToString() + ", Experiance: " + PlayerExp.ToString() + ".");
 }
Пример #2
0
 void UpdateEnergyBar()
 {
     EnemyEnergy.fillAmount  = float.Parse(Enemy.Instance.EnemyHealth.ToString()) / float.Parse(EnemyMaxHealth.ToString());
     PlayerEnergy.fillAmount = float.Parse(Player.Instance.PlayerHealth.ToString()) / float.Parse(PlayerMaxHealth.ToString());
 }