Exemplo n.º 1
0
 public MenuControl SetAction(Input.GameCommand key, Action <Entity> command)
 {
     foreach (KeyResponse kr in keyResponses)
     {
         if (kr.Key == key)
         {
             kr.Command = command;
             return(this);
         }
     }
     keyResponses.Add(new KeyResponse(key, command));
     return(this);
 }
Exemplo n.º 2
0
 // Can be used to add multiple actions for a single key. TODO: Delete this?
 public MenuControl AddAction(Input.GameCommand key, Action <Entity> command)
 {
     keyResponses.Add(new KeyResponse(key, command));
     return(this);
 }
Exemplo n.º 3
0
 public KeyResponse(Input.GameCommand key, Action <Entity> command)
 {
     Key     = key;
     Command = command;
 }