//Taking damage from Events private void TakeDamage(ScienceNum damageAmount) { damageAmount -= playerBattleInfo.Defense; if (damageAmount.baseValue < 0) { damageAmount.baseValue = 0; } playerBattleInfo.ChangeHealth(playerBattleInfo.CurrentHealth - damageAmount); }
void Awake() { //Build a dictionary of difficulties difficultyDictionary = new Dictionary <int, ScienceNum>(); int waveNum = 0; ScienceNum waveScale = new ScienceNum { baseValue = 1f, eFactor = 0 }; foreach (WaveSO wave in progressInfo.NeighborhoodSO.waves) { waveNum++; waveScale *= scalingPerWave; difficultyDictionary.Add(waveNum, waveScale); } }
private void TakeDamage(ScienceNum damageAmount) { mobBattleInfo.ChangeHealth(mobBattleInfo.CurrentHealth - damageAmount); }
private void TakeDamage(ScienceNum damageAmount) { playerInfo.ChangeHealth(playerInfo.CurrentHealth - damageAmount); }