public void ApplyDamage() { //call the method on the enemy to take damage if (enemy != null) { enemy.SendMessage("TakeDamage", attr.GetUnitAttack(), SendMessageOptions.RequireReceiver); } attacking = false; }