Ejemplo n.º 1
0
        protected void OnAttackedAndHit(AttackedAndHitEventArgs e)
        {
            EventHandler<AttackedAndHitEventArgs> handler = this.AttackedAndHit;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Ejemplo n.º 2
0
 private void HandleAttackedAndHit(object sender, AttackedAndHitEventArgs e)
 {
     if (e.X == this.x && e.Y == this.y && e.Z == this.z)
     {
         if (e.AttackerName == this.name)
         {
             this.writeToClient("You hit " + e.DefenderName + ", doing some damage.\r\n\r\n");
         }
         else
         {
             this.writeToClient(e.AttackerName + " hits " + e.DefenderName + ", doing some damage.\r\n\r\n");
         }
     }
 }