Exemplo n.º 1
0
    /// <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);
        }
    }
Exemplo n.º 2
0
 /// <summary>
 /// Create new model instance
 /// </summary>
 public StorytellingModel()
 {
     Instance = this;
 }