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

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