Example #1
0
 public ImageTextButton CreateButton()
 {
     return(new ImageTextButton(_transform.ToRectangle(),
                                () =>
     {
         if (!CurrentGameState.HasViewedItem(_dilemma))
         {
             Event.Publish(new ItemViewed(_dilemma));
         }
         Scene.NavigateTo(new DeductionScene(GameResources.GetPonderText(_dilemma), _deductions.Where(x => x.IsActive()).ToList()));
     },
                                GameResources.GetPonderText(_dilemma),
                                "Pondering/DilemmaCard", "Pondering/DilemmaCard-Hover", "Pondering/DilemmaCard-Press"));
 }
Example #2
0
        private void InitLocation()
        {
            if (!CurrentGameState.HasViewedItem(_location.Value))
            {
                Event.Publish(new ItemViewed(_location.Value));
            }

            CurrentGameState.CurrentLocation      = _location.Value;
            CurrentGameState.CurrentLocationImage = _locationImage;
            _location.Clues.ForEach(AddClue);
            _location.Pathways.ForEach(x => AddToRoom(x.CreateButton(ShowCantNavigate)));
            GameObjects.Characters.GetPeopleAt(_location.Value)
            .Select(x => new ImageButton(x.Image, x.Image, x.Image, x.WhereAreYouStanding(),
                                         () => TalkTo(x),
                                         () => x != _talkingTo)).ToArray().ForEach(AddToRoom);
            UpdateClues();
        }
Example #3
0
 public VisualClickableUIElement CreateButton(Vector2 position)
 {
     return(new ImageTextButton(new Transform2(position, UiButtons.PonderingSize()), () =>
     {
         _clearPriorDeduction();
         Event.Publish(new ThoughtGained(_thought));
         Scene.NavigateTo("Dilemmas");
     }, GameResources.GetPonderText(_thought), "Pondering/DilemmaCard", "Pondering/DilemmaCard-Hover", "Pondering/DilemmaCard-Press")
     {
         OnEnter = () =>
         {
             if (!CurrentGameState.HasViewedItem(_thought))
             {
                 Event.Publish(new ItemViewed(_thought));
             }
         }
     });
 }
Example #4
0
        private void InitDialogueOptions()
        {
            _isPresentingToUser         = false;
            _shouldShowDialogueControls = true;
            ClickUiBranch.Clear();
            var newDialogueChoices = new List <IVisual>();

            _person.GetNewDialogs().Take(4).ForEachIndex((x, i) =>
            {
                var button = x.CreateButton(StartDialogue, i, _person.GetNewDialogs().Count);
                ClickUiBranch.Add(button);
                newDialogueChoices.Add(button);
                if (x.IsExclusive && !CurrentGameState.HasViewedItem(nameof(ExclusiveChoicesTutorial)))
                {
                    Event.Publish(new ItemViewed(GameResources.WhatAreExclusiveChoices));
                }
            });

            ClickUiBranch.Add(_tutorial.Button);
            ClickUiBranch.Add(_subView.ClickUiBranch);
            ClickUiBranch.Add(_endConversationButton);
            _dialogueOptions = newDialogueChoices;
        }
    public override bool IsConditionMet(object condition)
    {
        var doesRemember = (DoesRememberDialogue)condition;

        return(gameState.HasViewedItem(doesRemember.Dialogue) != doesRemember.Inverse);
    }
Example #6
0
 private bool ShouldShowTutorial()
 {
     return(CurrentOptions.TutorialsAreEnabled && TutorialIsUnlocked && !CurrentGameState.HasViewedItem(_name));
 }
Example #7
0
    public override bool IsConditionMet(object condition)
    {
        var hasViewedItem = (HasViewedItem)condition;

        return(gameState.HasViewedItem(hasViewedItem.Item) != hasViewedItem.Inverse);
    }