// ***************************************************************************************************************************** // Take Damage ****************************************************************************************************************** public void MonsterTakeDamage(int amount, IHaveGold source) { Monster theMonster = getActive_Monster(); if (theMonster.isMonsterAlive()) { theMonster.SetMonsterLife(theMonster.getMonsterLife() - amount); } if (theMonster.getMonsterLife() <= 0) { //m_bIsAlive = false; GiveGold(theMonster.m_fMonsterLoot, source); //m_ActiveMonster = null; m_MonstersKilled++; m_ActiveMonster = new Monster(m_iActualLevelLvl); } }
public void DealDamage(int amount, IDamageable target, IHaveGold source) { target.MonsterTakeDamage(amount, source); }
// Give Gold public void GiveGold(float fAmount, IHaveGold target) { target.TakeGold(fAmount); }