Пример #1
0
        private void HandleStory()
        {
            // Big bad switch
            // Replace with something else at a later stage...
            switch (_progression)
            {
            case EStoryProgression.LookAround:
            {
                AddOutput(@"you look around");
                break;
            }

            case EStoryProgression.FindWood:
            {
                AddOutput(@"you search the field for branches. you found something you can burn");
                _resourceService.AddToResource(EResourceType.Wood, 10);
                _resourceService.EnableResource(EResourceType.Wood);
                break;
            }

            case EStoryProgression.FireInitial:
            {
                AddOutput(@"you start to light the fire");
                AddOutput(@"the fire starts to burn");
                _resourceService.SubtractFromResource(EResourceType.Wood, 5);
                break;
            }

            case EStoryProgression.FireLit:
            {
                AddOutput(@"the area is still cold");
                break;
            }

            case EStoryProgression.FireCold:
            {
                AddOutput(@"the fire keeps burning");
                Timer timer = new Timer((_) =>
                    {
                        AddOutput(@"a strange shivering creature joins you next to the fire");
                        AddOutput(@"you look past the creature and see a forest...");
                        _visibilityService.Unlock(EMenuType.Woods);
                        _resourceService.EnableResource(EResourceType.Food);
                    }, null, 7_500 / _state.HyperState.DivideBy, -1);
                break;
            }

            case EStoryProgression.FireWarm:
            {
                AddOutput(@"the area is getting warmer");
                break;
            }

            case EStoryProgression.FireWarmer:
            {
                AddOutput(@"the area is warm");
                break;
            }

            case EStoryProgression.FireHot:
            {
                AddOutput(@"the area is hot");
                Timer timer = new Timer((_) =>
                    {
                        AddOutput(@"the strange creature shifts into a humanoid form");
                        AddOutput(@"the strange creature says it can build stuff");
                        _workerService.EnableWorker(typeof(Builder));
                        _workerService.AddPersonToWorker(typeof(IdleWorker));
                        _workerService.AddPersonToWorker(typeof(Builder));
                        //_workerService.
                    }, null, 7_500 / _state.HyperState.DivideBy, -1);
                break;
            }

            case EStoryProgression.Initial:
            default:
            {
                AddOutput(@"the area is hot");

                break;
            }
            }
            _progression++;
        }