// Applies damage to the object public void TakeDamage(int pDamage) { m_iHealth -= pDamage; if (m_iHealth <= 0) { m_iHealth = 0; m_scShopController.DepositToWallet(m_iReward); } }