예제 #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
파일: King.cs 프로젝트: Andrey5kot/Labs
 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);
 }