protected override void OnUpdateStageContext()   //Engine_ChoiceCreate(myFirstMark,*DL_Choice_0*,true,<Engine_ScriptLoadFile(*SC_SomeScriptName*)>,mySecondMark,*DL_Choice_1*,false,<Engine_ScriptLoadFile(*SC_OtherScriptName*)>)
        {
            if (paraList.Count == 0 || paraList.Count % 4 != 0)
            {
                throw new System.Exception("EngineChoiceCreateNode");
            }

            StateMachineManager stateMachine = PachiGrimoire.I.StateMachine;

            stateMachine.TransferStateTo(ChoiceWaitState.Instance);
            StateBuff stateBuff = stateMachine.StateBuff;

            if (stateBuff == StateBuff.Next)
            {
                stateMachine.SetStateBuff(StateBuff.Normal);
            }

            List <ChoiceItem> choiceItemList = new List <ChoiceItem>();
            string            mark;
            string            dlIndex;
            bool   canBeSelected;
            string onSelectedScirptContext;

            for (int i = 0; i < paraList.Count; i += 4)
            {
                mark                    = paraList[i];
                dlIndex                 = paraList[i + 1];
                canBeSelected           = bool.Parse(paraList[i + 2]);
                onSelectedScirptContext = paraList[i + 3];
                ChoiceItem choiceItem = new ChoiceItem(mark, dlIndex, canBeSelected, onSelectedScirptContext);
                choiceItemList.Add(choiceItem);
            }
            StageRenderManager.I.ChoiceCreate(choiceItemList);
        }
Esempio n. 2
0
 public StageContextManager()
 {
     recordManager     = PachiGrimoire.I.PlayerRecordManager;
     stateMachine      = PachiGrimoire.I.StateMachine;
     scriptManager     = PachiGrimoire.I.ScriptManager;
     markManager       = PachiGrimoire.I.MarkManager;
     backlogManager    = PachiGrimoire.I.BacklogManager;
     pastScriptManager = PachiGrimoire.I.PastScriptManager;
     musicManager      = PachiGrimoire.I.MusicManager;
     renderManager     = PachiGrimoire.I.StageRenderManager;
 }
        private void Awake()
        {
            pachiGrimoire   = PachiGrimoire.I;
            constData       = pachiGrimoire.constData;
            config          = pachiGrimoire.ConfigManager.Config;
            stateMachine    = pachiGrimoire.StateMachine;
            resourceManager = pachiGrimoire.ResourceManager;
            musicManager    = pachiGrimoire.MusicManager;
            renderManager   = pachiGrimoire.StageRenderManager;
            configManager   = pachiGrimoire.ConfigManager;

            panel = root.GetComponent <UIPanel>();
            root.SetActive(false);

            listener          = UIEventListener.Get(eventListener);
            listener.onPress  = OnMyPress;
            listener.onScroll = OnMyScroll;

            Initilize();
        }