Ejemplo n.º 1
0
 /// <summary>
 /// Adds a trigger to action.
 /// </summary>
 /// <param name="trigger"></param>
 public void AddTrigger(IActionTrigger trigger)
 {
     lock (triggers)
     {
         triggers.Add(trigger);
         trigger.BindTo(this);
         trigger.Initialize(mapping.InputProvider, true);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Removes trigger from action.
 /// </summary>
 /// <param name="trigger"></param>
 public void RemoveTrigger(IActionTrigger trigger)
 {
     lock (triggers)
     {
         if (triggers.Remove(trigger))
         {
             trigger.Initialize(mapping.InputProvider, false);
             trigger.BindTo(null);
         }
     }
 }