public void RunActions() { actions.RunActions(); Close(); if (!runChild) { return; } for (int i = 0; i < childObjects.Count; i++) { LogicObject temp = logicManager.data.GetLogicObject(childObjects[i]); if (temp != null) { temp.Init(logicManager); } } if (isSupportAlwaysActive) { if (events.Count == 0) { // Debug.LogWarning("逻辑状态模块无事件只执行一次 Name:" + name + " id: " + id); return; } else { Init(logicManager); } } }
public void Init(LogicObject logicObject) { for (int i = 0; i < GetLogicComs().Count; i++) { ActionComponentBase td = (ActionComponentBase)GetLogicComs()[i]; td.Initialize(logicObject); actionComponentObjs.Add(td); } }
protected override void Action() { for (int i = 0; i < componetIdList.Count; i++) { LogicObject to = logicObject.logicManager.data.GetLogicObject(componetIdList[i]); if (to != null) { to.events.enable = enableEvent; to.conditions.enable = enableCondition; to.actions.enable = enableAction; to.runChild = runChild; } } }
public void Init(LogicRuntimeMachine logicManager) { this.logicManager = logicManager; for (int i = 0; i < logicObjs.Count; i++) { LogicObject to = logicObjs[i]; if (to.id == startId) { to.Init(logicManager); } else if (to.isSupportAlwaysActive) { to.Init(logicManager); } } }
public void Pause(bool isPause) { if (isPause == this.isPause) { return; } this.isPause = isPause; for (int i = 0; i < runningLogicObjects.Count; i++) { LogicObject to = data.GetLogicObject(runningLogicObjects[i]); if (to != null) { to.OnPause(isPause); } } List <int> dis = new List <int>(internalLogicMachineDic.Values); for (int i = 0; i < dis.Count; i++) { LogicSystemManager.PauseLogicRuntimeMachine(i, isPause); } }
public void RunActions(int id) { LogicObject to = data.GetLogicObject(id); to.RunActions(); }
public void Initialize(LogicObject logicObject) { this.logicObject = logicObject; UpdateInternalValue(); Init(); }