public FileManager(ConfigManager configManager, PlayerRecordManager playerRecordManager, ResourceManager resourceManager, ConstData constData)
 {
     this.configManager       = configManager;
     this.playerRecordManager = playerRecordManager;
     this.resourceManager     = resourceManager;
     this.constData           = constData;
 }
Exemple #2
0
        public override void OnEnter(BaseState oldState)
        {
            if (oldState == IdleState.Instance)
            {
                Debug.Log("状态切换 :IdleState -> RunScriptState");
                ConstData     constData     = PachiGrimoire.I.constData;
                ScriptManager scriptManager = PachiGrimoire.I.ScriptManager;

                string mainScriptContext = PachiGrimoire.I.ResourceManager.Get <string>(constData.ScriptIndexPrefix + "_" + constData.MainScriptFileNameWithoutTXT);
                scriptManager.LoadScriptFile(constData.MainScriptFileNameWithoutTXT, mainScriptContext);
            }
        }
        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();
        }
        public void InitializeStory()
        {
            ScriptReplaceKeys             = new List <string>();
            ScriptReplaceValues           = new List <string>();
            pointerScriptNameStack        = new Stack <string>();
            pointerLineNumberStack        = new Stack <int>();
            isSecondGear                  = false;
            secondScriptSentenceList      = null;
            secondScriptPointerLineNumber = -1;

            ConstData constData         = PachiGrimoire.I.constData;
            string    initScriptContext = PachiGrimoire.I.ResourceManager.Get <string>(constData.ScriptIndexPrefix + "_" + constData.InitScriptFileNameWithoutTXT);

            Debug.Log(initScriptContext);
            LoadScriptFile(constData.InitScriptFileNameWithoutTXT, initScriptContext);
            while (NextSentence())
            {
                ;
            }
            Debug.Log("执行完毕InitScript in InitializeStory()");
        }