コード例 #1
0
 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);
         }
     }
 }
コード例 #2
0
ファイル: ActionsObject.cs プロジェクト: TenYearsADream/Frame
 public void Init(LogicObject logicObject)
 {
     for (int i = 0; i < GetLogicComs().Count; i++)
     {
         ActionComponentBase td = (ActionComponentBase)GetLogicComs()[i];
         td.Initialize(logicObject);
         actionComponentObjs.Add(td);
     }
 }
コード例 #3
0
 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;
         }
     }
 }
コード例 #4
0
 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);
         }
     }
 }
コード例 #5
0
        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);
            }
        }
コード例 #6
0
        public void RunActions(int id)
        {
            LogicObject to = data.GetLogicObject(id);

            to.RunActions();
        }
コード例 #7
0
 public void Initialize(LogicObject logicObject)
 {
     this.logicObject = logicObject;
     UpdateInternalValue();
     Init();
 }