protected virtual void OnNPCMoved(PlayerMovedEventArgs e) { EventHandler<PlayerMovedEventArgs> handler = this.NPCMoved; if (handler != null) { handler(this, e); } }
private void HandlePlayerMoved(object sender, PlayerMovedEventArgs e) { if( e.X == this.x && e.Y == this.y && e.Z == this.z) { this.writeToClient(e.Name + " enters the room.\r\n"); } //TODO: add which direction player left in if (e.OldX == this.x && e.OldY == this.y && e.OldZ == this.z) { this.writeToClient(e.Name + " heads " + e.Direction + ".\r\n"); } }