Пример #1
0
 protected virtual void OnBeingAttacked(AttackEventArgs args)
 {
     BeingAttacked?.Invoke(args);
 }
Пример #2
0
        public virtual void StartAttack()
        {
            Console.WriteLine($"King {this.Name} is under attack!");

            BeingAttacked?.Invoke(this, EventArgs.Empty);
        }
Пример #3
0
 protected virtual void OnBeingAttacked()
 {
     Console.WriteLine($"King {this.Name} is under attack!");
     BeingAttacked?.Invoke(this, EventArgs.Empty);
 }
Пример #4
0
 private void OnBeingAttacked()
 {
     BeingAttacked?.Invoke(this, EventArgs.Empty);
 }