public static SEScene GetSceneByName(string sceneName) { SEScene outScene = null; scenesLoable.TryGetValue(sceneName, out outScene); return(outScene); }
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); }
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; }
public static void AddScene(SEScene scene) { scenesLoable.Add(scene.GetName(), scene); }