Exemple #1
0
        private static void InitScene(GameConfig item)
        {
            string sceneID = item.ID;
            SceneBusiness scene;
            switch ((SceneType)Int32.Parse(item.SubType))
            {
                case SceneType.City:
                    scene = new SceneCity(item);
                    break;
                case SceneType.Outdoor:
                    scene = new SceneOutdoor(item);
                    break;
                case SceneType.Ectype:
                    OnlyOne(item);
                    scene = new SceneEctype(item);
                    break;
                case SceneType.SubEctype:
                    OnlyOne(item);
                    scene = new SceneSubEctype(item);
                    break;
                case SceneType.Home:
                    scene = new SceneHome(item);
                    break;
                case SceneType.Battle:
                    scene = new SceneBattle(item);
                    break;
                case SceneType.Rob:
                    scene = new SceneRob(item);
                    break;
                case SceneType.Pro:
                    OnlyOne(item);
                    scene = new ScenePro(item);
                    break;
                case SceneType.ArenaPerson:
                    scene = new ScenePerson(item);
                    break;
                case SceneType.ArenaFamily:
                    scene = new SceneFamily(item);
                    break;
                case SceneType.ArenaTeam:
                    scene = new SceneTeam(item);
                    break;
                case SceneType.Instance:
                    scene = new SceneInstance(item);
                    break;
                default:
                    return;
            }
            if (item.UI != null && item.UI.ContainsKey("RoadObject"))
            {
                Variant v = item.UI["RoadObject"] as Variant;
                if (v == null)
                {
                    LogWrapper.Warn(string.Format("Scene{0},no walking info", scene.Name));
                    return;
                }
                scene.InitWalk(v);
            }

            m_scenes.Add(sceneID, scene);
            //const int line = 2;
            //SceneBusiness[] scenes = new SceneBusiness[line];
            //scenes[0] = scene;
            //for (int i = 1; i < line; i++)
            //{
            //    scenes[i] = scene.CreateNew();
            //}
            //m_scenes.Add(sceneID, scenes);
        }
Exemple #2
0
 SceneSubEctype(SceneSubEctype scene)
     : base(scene)
 {
     m_showAll = false;
 }