/// <summary> /// Default constructor /// </summary> /// <param name="storytellingView">Reference for this class</param> public StorytellingPresenter(StorytellingView storytellingView) { _storytellingView = storytellingView; //Fetch the model instance _storytellingModel = StorytellingModel.GetInstance(); //Fetch the content from the model string title = _storytellingModel.StoryTitle; string text = _storytellingModel.StoryText; //Apply content depending on if the story has a sprite or not if (_storytellingModel.StorySprite != null) { _storytellingView.SetViewContent(title, _storytellingModel.StorySprite, text); } else { _storytellingView.SetViewContent(title, text); } }
/// <summary> /// Create new model instance /// </summary> public StorytellingModel() { Instance = this; }