public string GetState(string aActionName) { var action = FindAction(aActionName); AntLog.Assert(action == null, string.Format("Action \"{0}\" not registered!", aActionName), true); return(action.state); }
public virtual void Add <T>(int aPriority = 0) { Type type = typeof(T); ConstructorInfo constructor = type.GetConstructor(Type.EmptyTypes); ISystem system = (ISystem)constructor.Invoke(null); AntLog.Assert(system == null, "Class \"" + AntLog.Bold(type.ToString()) + "\" not implemented ISystem interface!"); Add(system, aPriority); }
/// <summary> /// Устанавливает состояение по умолчанию как текущее. /// </summary> public void SetDefaultState() { if (currentState != null) { currentState.Stop(); } AntLog.Assert(defaultState == null, "Default <b>State</b> is not defined!", true); currentState = defaultState; currentState.Reset(); currentState.Start(); }