public void Load() { if (IsLoaded) { return; } LoadCurrentScene(); LoadActors(); IsLoaded = true; StaticControls.GetControlByName("SceneBox").Visible = true; // HIGH: This should probably be part of a scene event called Ready }
private void LoadCurrentScene() { if (!(StaticControls.GetControlByName("SceneBox") is PictureBox sceneBox)) { throw new ApplicationException("Static control is missing"); } var sceneIndex = this.GetStateForCurrentStage(); if (!Scenes.ContainsKey(sceneIndex)) { throw new ApplicationException($"Scene index {sceneIndex} is invalid for scene {Name}"); } var currentScene = Scenes[sceneIndex]; currentScene.Load(); var image = currentScene.Data; sceneBox.Image = image; // TODO: Index should come from Player data's sceneStateDictionary }