예제 #1
0
        //  *****************************************************************************************************************************

        // 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);
            }
        }
예제 #2
0
 public void DealDamage(int amount, IDamageable target, IHaveGold source)
 {
     target.MonsterTakeDamage(amount, source);
 }
예제 #3
0
 // Give Gold
 public void GiveGold(float fAmount, IHaveGold target)
 {
     target.TakeGold(fAmount);
 }