Esempio n. 1
0
 /// <summary>
 /// Trigger the OnActionCompleted event
 /// </summary>
 /// <param name="action">The action that triggered it</param>
 public void TriggerOnActionCompleted(OM_Action action)
 {
     if (onActionCompleted != null)
     {
         onActionCompleted.Invoke(action);
     }
 }
Esempio n. 2
0
    /// <summary>
    /// Remove an action from the queue by name. Pretty inefficient so only use if necessary
    /// </summary>
    /// <param name="name">The name of the action</param>
    public void RemoveActionByName(string name)
    {
        OM_Action toRemove = null;

        foreach (OM_Action action in OM_ActionQueue)
        {
            if (action.Name == name)
            {
                toRemove = action;
                break;
            }
        }

        if (toRemove != null)
        {
            OM_ActionQueue.Remove(toRemove);
        }
    }