private void Initialize()
        {
            if (isShutDown)
            {
                return;
            }
            fileManager           = new FileManager(configManager, playerRecordManager, resourceManager, constData);
            scriptManager         = new ScriptManager(pastScriptManager);
            backlogManager        = new BacklogManager(constData.BacklogCapacity);
            stageRenderManager    = GetComponent <StageRenderManager>() ?? gameObject.AddComponent <StageRenderManager>();
            saveLoadRenderManager = GetComponent <SaveLoadRenderManager>() ?? gameObject.AddComponent <SaveLoadRenderManager>();
            musicManager          = GetComponent <MusicManager>() ?? gameObject.AddComponent <MusicManager>();
            stageContextManager   = new StageContextManager();

            #region Test
            //configManager.Config.Language = "Chinese";
            //configManager.Config.CharacterNameList = new List<string>(new string[] { "A", "B", "C", "ETC" });
            //configManager.Config.SystemVolume = 1f;
            //configManager.Config.BGMVolume = 1f;
            //configManager.Config.SEVolume = 1f;
            //configManager.Config.MessageSpeed = 1f;
            //configManager.Config.AutoMessageSpeed = 1f;
            //configManager.Config.IsReadSkipOrAllSkipNot = true;
            //configManager.Config.VoiceVolume = 1f; // Slider
            //configManager.Config.VoiceVolumeValueList = new List<float>(new float[] { 1, 1, 1, 1 }); // Sliders
            //configManager.Config.IsPlayingVoiceAfterChangeLine = false; // Toggle
            //configManager.Config.HasAnimationEffect = true; // Toggle
            //configManager.Config.AlphaOfConsole = 0.5f;
            //configManager.SaveConfigContext();
            #endregion


            StateMachine.TransferStateTo(InitState.Instance);
        }
Beispiel #2
0
        protected override void Initilize()
        {
            if (instance == null)
            {
                instance = this;
            }
            else
            {
                Destroy(this);
                return;
            }
            stageContextManager  = pachiGrimoire.StageContextManager;
            backlogRenderManager = GetComponent <BacklogRenderManager>();
            configRenderManager  = GetComponent <ConfigRenderManager>();
            slRenderManager      = GetComponent <SaveLoadRenderManager>();

            messageSpeedLowest  = constData.MessageSpeedLowest;
            messageSpeedHighest = constData.MessageSpeedHighest;

            UIEventListener.Get(confirmYes).onPress = (GameObject go, bool isPress) => {
                if (isPress == false)
                {
                    return;
                }
                if (!isConfirmWorking)
                {
                    return;
                }
                OnConfirmYESHide();
            };
            UIEventListener.Get(confirmNo).onPress = (GameObject go, bool isPress) => {
                if (isPress == false)
                {
                    return;
                }
                if (!isConfirmWorking)
                {
                    return;
                }
                OnConfirmNOHide();
            };
            confirmRoot.SetActive(false);

            //InitializeStory();
        }