/// <summary> /// Under attack. Invoke under attack event. /// </summary> /// <param name="strength"></param> public void Attack(int strength) { if (Life > 0) { Life -= strength; UnderAttackEvent?.Invoke(this, new UnderAttackArgs()); } }
//2. create get help method private void RaiseGetHelp(string weapon) { UnderAttackEvent?.Invoke(this, weapon); }
internal void InvokeUnderAttackEvent(UnderAttackEvent arg) { UnderAttackEvent?.Invoke(this, arg); }
internal void InvokeUnderAttackEvent(UnderAttackEvent arg) => UnderAttackEvent?.Invoke(null, arg);