/// <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); } }
/// <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); } } }