Ejemplo n.º 1
0
        private void SequenceNodeWithDelayAction()
        {
            SequenceNode m_SequenceNode = new SequenceNode();

            m_SequenceNode.Append(DelayAction.Allocate(1, () => Log.I(Time.time)));
            m_SequenceNode.Append(DelayAction.Allocate(1, () => Log.I(Time.time)));
            m_SequenceNode.Append(DelayAction.Allocate(1, () => Log.I(Time.time)));
            m_SequenceNode.Append(DelayAction.Allocate(1, () => Log.I(Time.time)));
            m_SequenceNode.Append(DelayAction.Allocate(1, () => Log.I(Time.time)));
            this.ExecuteNode(m_SequenceNode);
        }
Ejemplo n.º 2
0
        private void SequenceNodeWithEventAction()
        {
            SequenceNode m_SequenceNode = new SequenceNode();

            m_SequenceNode.Append(EventAction.Allocate(() => { Log.I(Time.time); }));
            m_SequenceNode.Append(EventAction.Allocate(() => { Log.I(Time.time); }));
            m_SequenceNode.Append(EventAction.Allocate(() => { Log.I(Time.time); }));
            m_SequenceNode.Append(EventAction.Allocate(() => { Log.I(Time.time); }));
            m_SequenceNode.Append(EventAction.Allocate(() => { Log.I(Time.time); }));
            this.ExecuteNode(m_SequenceNode);
        }
Ejemplo n.º 3
0
        public override void OnSingletonInit()
        {
            //需轮询module
            GetModule <ProcedureManager>();
            GetModule <InputModule>();

            //不需轮询,module
            SequenceNode sequenceNode = new SequenceNode();

            sequenceNode.Append(DataAnalysisAction.Allocate());
            sequenceNode.Append(EventAction.Allocate(() => { NetworkModule.S.Init(); }));
            sequenceNode.Append(TableAction.Allocate());
            sequenceNode.Append(EventAction.Allocate(() => { GamePersistentData.S.HandleTDData(); }));
            sequenceNode.Append(EventAction.Allocate(() => { GameDataMgr.S.Init(); }));
            sequenceNode.Append(EventAction.Allocate(() =>
            {
                GuideModule guideModule = new GuideModule();
                guideModule.OnInit();
            }));
            sequenceNode.OnEndedCallback += () => { GetModule <ProcedureManager>().StartProcedure <GamingProcedure>(); };
            ApplicationMgr.S.ExecuteNode(sequenceNode);
        }