Esempio n. 1
0
 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
 }
Esempio n. 2
0
        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
        }