コード例 #1
0
        public static LogicRuntimeMachine NewLogicRuntimeMachine(string fileName)
        {
            LogicObjectContainer container = LogicObjectDataController.GetDataFromFile(fileName);
            int id = GetId;
            LogicRuntimeMachine lom = new LogicRuntimeMachine(id, container);

            logicMachineDic.Add(id, lom);
            return(lom);
        }
コード例 #2
0
        public void DispatchEvent(string eventName, params object[] args)
        {
            localEvent.DispatchEvent(eventName, args);
            List <int> list = new List <int>(internalLogicMachineDic.Values);

            for (int i = 0; i < list.Count; i++)
            {
                LogicRuntimeMachine lom = LogicSystemManager.GetLogicRuntimeMachine(list[i]);
                lom.DispatchEvent(eventName, args);
            }
        }
コード例 #3
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);
         }
     }
 }
コード例 #4
0
        public void Init(LogicRuntimeMachine logicManager)
        {
            this.logicManager = logicManager;
            if (isInit)
            {
                return;
            }
            isInit = true;
            events.Init(this);
            conditions.Init(this);
            actions.Init(this);
            if (events.Count == 0)
            {
                RunConditionCompare();
            }

            logicManager.runningLogicObjects.Add(id);
        }
コード例 #5
0
 protected override void Action()
 {
     LogicRuntimeMachine lom = LogicSystemManager.NewLogicRuntimeMachine(logicMachineFileName);
     logicObject.logicManager.AddChildLogicMachine(controlName, lom.Id);
     lom.Start();
 }
コード例 #6
0
 // Use this for initialization
 void Start()
 {
     logicManager = LogicSystemManager.NewLogicRuntimeMachine(logicFileName);
     logicManager.AddRuntimeGameObjects("target", gameObject);
     logicManager.Start();
 }