Beispiel #1
0
        //シーン内のAdvエンジンの初期設定
        void InitUtageEngine()
        {
            //シナリオデータの設定
            AdvEngine        engine  = GameObject.FindObjectOfType <AdvEngine>();
            AdvEngineStarter starter = GameObject.FindObjectOfType <AdvEngineStarter>();

            AdvSettingDataManager   settingDataAsset      = UtageEditorToolKit.LoadAssetAtPath <AdvSettingDataManager>(GetSettingAssetRelativePath());
            AdvScenarioDataExported exportedScenarioAsset = UtageEditorToolKit.LoadAssetAtPath <AdvScenarioDataExported>(GetScenarioAssetRelativePath());

            AdvScenarioDataExported[] exportedScenarioDataTbl = { exportedScenarioAsset };
            starter.InitOnCreate(engine, settingDataAsset, exportedScenarioDataTbl, newProjectName);

            UguiLetterBoxCamera[] cameras = GameObject.FindObjectsOfType <UguiLetterBoxCamera>();
            foreach (UguiLetterBoxCamera camera in cameras)
            {
                camera.Width  = camera.MaxWidth = gameScreenWidth;
                camera.Height = camera.MaxHeight = gameScreenHeight;
            }

            //セーブファイルの場所の設定
            AdvSaveManager saveManager = GameObject.FindObjectOfType <AdvSaveManager>();

            saveManager.DirectoryName = "Save" + newProjectName;

            AdvSystemSaveData systemSaveData = GameObject.FindObjectOfType <AdvSystemSaveData>();

            systemSaveData.DirectoryName = "Save" + newProjectName;

            //シーン内の全てのテンプレートアセットをクローンアセットに置き換える
            ReplaceAssetsFromTempleateToCloneInSecne();
        }
        //シーン内のAdvエンジンの初期設定
        void InitUtageEngine()
        {
            //シナリオデータの設定
            AdvEngine        engine  = GameObject.FindObjectOfType <AdvEngine>();
            AdvEngineStarter starter = GameObject.FindObjectOfType <AdvEngineStarter>();

//			AdvScenarioDataExported exportedScenarioAsset = UtageEditorToolKit.LoadAssetAtPath<AdvScenarioDataExported>(GetScenarioAssetRelativePath());
//			AdvScenarioDataExported[] exportedScenarioDataTbl = { exportedScenarioAsset };
            starter.InitOnCreate(engine, AdvScenarioDataBuilderWindow.ProjectData.Scenarios, newProjectName);
            starter.ScenarioDataProject = AdvScenarioDataBuilderWindow.ProjectData;

            LetterBoxCamera[] cameras = GameObject.FindObjectsOfType <LetterBoxCamera>();
            foreach (LetterBoxCamera camera in cameras)
            {
                camera.Width  = camera.MaxWidth = gameScreenWidth;
                camera.Height = camera.MaxHeight = gameScreenHeight;
            }

            //セーブファイルの場所の設定
            AdvSaveManager saveManager = GameObject.FindObjectOfType <AdvSaveManager>();

            saveManager.DirectoryName = "Save" + newProjectName;

            AdvSystemSaveData systemSaveData = GameObject.FindObjectOfType <AdvSystemSaveData>();

            systemSaveData.DirectoryName = "Save" + newProjectName;

            //シークレットキーの設定
            FileIOManager[] fileIOManagers = GameObject.FindObjectsOfType <FileIOManager>();
            foreach (FileIOManager item in fileIOManagers)
            {
                item.SetCryptKey(this.secretKey);
            }

            //シーン内の全てのテンプレートアセットをクローンアセットに置き換える
            ReplaceAssetsFromTemplateToCloneInSecne();
        }
 public void Awake()
 {
     _instance = this;
 }