Esempio n. 1
0
        public static SEScene GetSceneByName(string sceneName)
        {
            SEScene outScene = null;

            scenesLoable.TryGetValue(sceneName, out outScene);
            return(outScene);
        }
Esempio n. 2
0
        protected override void Initialize()
        {
            base.Initialize();

            SEResourcesManager.LoadSprite(Content, @"Debug\frame");

            engineScene     = new SEScene("engineScene");
            childsPanel     = new SEPanel(new Rectangle(0, 0, SEProperties.GetEngineWindowWidth() / 2, SEProperties.GetGameWindowHeight()), SEResourcesManager.GetSpriteByName(@"Debug\frame"));
            componentsPanel = new SEPanel(new Rectangle(SEProperties.GetEngineWindowWidth() / 2, 0, SEProperties.GetEngineWindowWidth() / 2, SEProperties.GetGameWindowHeight()), SEResourcesManager.GetSpriteByName(@"Debug\frame"));
            engineScene.AddChild(childsPanel);
            engineScene.AddChild(componentsPanel);
        }
Esempio n. 3
0
        public static void LoadScene(string sceneName)
        {
            var newScene = GetSceneByName(sceneName);

            for (int i = 0; i < newScene.GetChilds().Count; ++i)
            {
                if (newScene.GetChilds()[i].IsDestroyOnLoad())
                {
                    newScene.AddChild(newScene.GetChilds()[i]);
                }
            }
            currentScene = newScene;
        }
Esempio n. 4
0
 public static void AddScene(SEScene scene)
 {
     scenesLoable.Add(scene.GetName(), scene);
 }