예제 #1
0
        void Awake()
        {
            Instance = this;
            var sceneId = WorldManager.worldManager.GetActive().def.id;

            Log.Sys("Inital SceneId Layout " + sceneId);
            LevelConfigData.Init();
            configLists = LevelConfigData.LevelLayout [sceneId];
            Log.Sys("ConfigList " + configLists.Count);
        }
예제 #2
0
        public void WorldChangeScene(int sceneId, bool isRelive)
        {
            LevelConfigData.Init();
            var hasData = LevelConfigData.LevelLayout.ContainsKey(sceneId);

            if (!hasData)
            {
                WindowMng.windowMng.ShowNotifyLog("关卡尚未开放");
                return;
            }

            StartCoroutine(ChangeScene(sceneId, isRelive));
        }
예제 #3
0
        void LoadWater()
        {
            var sceneId = WorldManager.worldManager.GetActive().def.id;

            LevelConfigData.Init();
            var configLists = LevelConfigData.LevelLayout [sceneId];
            var first       = configLists [0];

            Log.Sys("LoadWater " + first.type);
            if (LevelConfigData.envConfig.ContainsKey(first.type))
            {
                Log.Sys("LoadWater " + first.type);
                var d      = LevelConfigData.envConfig[first.type];
                var bottom = Resources.Load <GameObject>(d.waterBottom);
                var b      = GameObject.Instantiate(bottom) as GameObject;
                Log.Sys("WaterObj " + b);
                //Util.InitGameObject(b);

                var bottom2 = Resources.Load <GameObject>(d.waterFace);
                var b2      = GameObject.Instantiate(bottom2) as GameObject;
                b2.transform.localPosition = new Vector3(0, d.offY, 0);
                //Util.InitGameObject(b2);
            }
        }