Пример #1
0
        static void TutorialLoader(YirdData yirdData, PeGameMgr.ETutorialMode tutorialMode)
        {
            Debug.Log("Now Load Tutorial Scene, Mode is: " + tutorialMode.ToString());

            Debug.Log(System.DateTime.Now.ToString("G") + "[Start Game Mode] " + "tutorial****************");

            bool bNewGame = true;

            PeLauncher.Instance.Add(new LoadTutorialPlayerSpawnPos(bNewGame));  //TODO this is test position

            PeLauncher.Instance.Add(new ResetGlobalData());

            PeLauncher.Instance.Add(new LoadCamera());

            PeLauncher.Instance.Add(new LoadEditedTerrain(bNewGame, string.Empty));            //yirdData.terrainPath));
            //PeLauncher.Instance.Add(new LoadEditedTerrain(bNewGame, yirdData.terrainPath));

            PeLauncher.Instance.Add(new LoadItemAsset(bNewGame));

            PeLauncher.Instance.Add(new LoadWaveSystem());

            PeLauncher.Instance.Add(new LoadCustomDoodad(bNewGame, yirdData.GetDoodads()));

            //PeLauncher.Instance.Add(new LoadCustomDragItem(bNewGame, customGame.GetItems()));

            PeLauncher.Instance.Add(new LoadCreature(bNewGame));

            PeLauncher.Instance.Add(new LoadEntityCreator(bNewGame));

            //PeLauncher.Instance.Add(new LoadCustomStory(bNewGame, customGame));

            PeLauncher.Instance.Add(new LoadGUI());

            PeLauncher.Instance.Add(new LoadCustomMap(bNewGame));

            PeLauncher.Instance.Add(new InitBuildManager(bNewGame)); //Add by  wang can

            PeLauncher.Instance.Add(new LoadTutorial());

            PeLauncher.Instance.Add(new LoadTutorialInitData(bNewGame));
        }
Пример #2
0
//        static void LoadCustom(bool bNewGame, YirdData yirdData)
        static void LoadCustom(bool bNewGame, CustomGameData customData)
        {
            YirdData yirdData = customData.curYirdData;

            if (null == yirdData)
            {
                Debug.LogError("custom game data is null");
                return;
            }


            Debug.Log(System.DateTime.Now.ToString("G") + "[Start Game Mode] " + (!bNewGame ? "saved" : "new") + " Custom, path:" + yirdData.terrainPath + "****************");

            PeLauncher.Instance.Add(new ResetGlobalData());

            PeLauncher.Instance.Add(new LoadReputation(bNewGame));

            PeLauncher.Instance.Add(new LoadRandomItemMgr());

            PeLauncher.Instance.Add(new LoadCustomPlayerSpawnPos(bNewGame, customData.curPlayer.StartLocation));

            PeLauncher.Instance.Add(new LoadCamera());

            PeLauncher.Instance.Add(new LoadEditedTerrain(bNewGame, yirdData.terrainPath));

            PeLauncher.Instance.Add(new LoadPathFinding());
            PeLauncher.Instance.Add(new LoadPathFindingEx());

            PeLauncher.Instance.Add(new LoadCreationData(bNewGame));
            PeLauncher.Instance.Add(new LoadItemAsset(bNewGame));

            PeLauncher.Instance.Add(new LoadWaveSystem());

            // Grass
            PeLauncher.Instance.Add(new LoadEditedGrass(bNewGame, yirdData.grassPath));

            // Tree
            PeLauncher.Instance.Add(new LoadVETreeProtos(bNewGame));
            PeLauncher.Instance.Add(new LoadEditedTree(bNewGame, yirdData.treePath));

            PeLauncher.Instance.Add(new LoadEnvironment());

            PeLauncher.Instance.Add(new LoadWorldInfo(bNewGame));

            //PeLauncher.Instance.Add(new LoadCustomMap(bNewGame));

            PeLauncher.Instance.Add(new LoadCustomDoodad(bNewGame, yirdData.GetDoodads()));

            PeLauncher.Instance.Add(new LoadCustomDragItem(yirdData.GetItems()));

            PeLauncher.Instance.Add(new LoadCustomSceneEffect(yirdData.GetEffects()));

            PeLauncher.Instance.Add(new LoadCustomCreature(bNewGame));

            PeLauncher.Instance.Add(new LoadCustomEntityCreator(bNewGame, yirdData));

            PeLauncher.Instance.Add(new LoadNPCTalkHistory(bNewGame));

            PeLauncher.Instance.Add(new LoadGUI());

            PeLauncher.Instance.Add(new LoadWorldCollider());

            PeLauncher.Instance.Add(new LoadUiHelp(bNewGame));

            PeLauncher.Instance.Add(new InitBuildManager(bNewGame));

            PeLauncher.Instance.Add(new LoadCustomStory(bNewGame, customData));

            PeLauncher.Instance.Add(new LoadSingleCustomInitData(bNewGame));

            PeLauncher.Instance.Add(new LoadLootItem(bNewGame));

            PeLauncher.Instance.Add(new LoadWorldCollider());

            PlayerPackageCmpt.LockStackCount = false;
        }