Exemple #1
0
 public Player()
 {
     _coordinates = new List <Coordinate>(16);
     Score        = 0;
     Dead         = false;
     EventDispatchThread.AddKeyListener(Directions);
 }
Exemple #2
0
 /// <summary>
 /// Adds a HotKey to this item.
 /// </summary>
 /// <param name="binder">The console key to be binded.</param>
 /// <param name="listener">The listener that registers the event.</param>
 public void AddHotKeyListener(ConsoleKey binder, HotKeyListener listener)
 {
     if (HotKeyPressed != null)
     {
         return;
     }
     EventDispatchThread.AddKeyListener(OnKeyPressed);
     Binder         = binder;
     HotKeyPressed += listener;
 }