Пример #1
0
        private void Beginstory(Story story)
        {
            SetComponentsVisibility(true);

            _storyTeller = _storyTellerFactory.BeginStory(story);
            UpdateDisplay();
        }
Пример #2
0
        private static Story ReadFromZipArchive(string path)
        {
            Story extractedStory;

            using (var archive = ZipFile.OpenRead(path))
            {
                var storyData = archive.Entries.SingleOrDefault(x => x.Name.EndsWith(".data")).Extract<StoryData>();

                extractedStory = new Story
                {
                    Data = storyData,
                    Parts = ExtractChoices(archive).ToDictionary(x => x.Id)
                };
            }

            return extractedStory;
        }
Пример #3
0
 public void Dispose(bool disposing)
 {
     _story = null;
 }
Пример #4
0
 internal StoryTeller(Story story)
 {
     _story = story;
     _currentPart = story.Parts[story.Data.Id];
 }