Exemple #1
0
        public void Init()
        {
            _tutorial = new ExclusiveChoicesTutorial();
            _subView  = new ScanView(_person, DisableDialogueControls, InitDialogueOptions, () => !_isPresentingToUser);
            _subView.Init();
            _endConversationButton = new ImageTextButton(new Transform2(new Rectangle(-684, 960, 1380, 64)), _onFinished,
                                                         "Ok, great.",
                                                         "Convo/DialogueButton", "Convo/DialogueButton-Hover", "Convo/DialogueButton-Press")
            {
                TextColor     = Color.White,
                TextTransform = new Transform2(new Vector2(60, 960), new Size2(1380 - 684, 64)),
                TextAlignment = HorizontalAlignment.Left
            };

            _characterView = new CharacterView(_person, () => _shouldShowDialogueControls);
            _playerView    = new PlayerCharacterView(() => _shouldShowDialogueControls);

            _onNextDialogueElement = x => {
                _characterView.UpdateDialogue(x);
                _playerView.UpdateDialogue(x);
            };

            if (_person.IsImmediatelyTalking())
            {
                _person.StartImmediatelyTalking(StartDialogue);
            }
            else
            {
                InitDialogueOptions();
            }
        }
Exemple #2
0
        protected override void OnInit()
        {
            _playerCharacter = new PlayerCharacterView(() => true);
            var header = UiLabels.FullWidthHeaderLabel("New Game", Color.White);

            header.Transform.Location = new Vector2(header.Transform.Location.X, 158);
            Add(header);

            _keyboard = new KeyboardTyping(GameResources.DefaultPlayerCharacterName);
            Add(_keyboard);
            var yStart = 331;

            Add(new Label {
                Text = "Character Name", Transform = new Transform2(new Vector2(758, yStart), new Size2(400, 50))
            });
            Add(new ColoredRectangle {
                Color = Color.FromNonPremultiplied(31, 185, 219, 199), Transform = new Transform2(new Vector2(758, yStart + 60 - 2), new Size2(404, 79))
            });
            _textboxLabel = new Label {
                Text = GameResources.DefaultPlayerCharacterName, Transform = new Transform2(new Vector2(760, yStart + 60), new Size2(400, 75)), BackgroundColor = Color.FromNonPremultiplied(25, 75, 110, 255)
            };
            Add(_textboxLabel);

            yStart = 541;
            Add(new Label {
                Text = "Difficulty", Transform = new Transform2(new Vector2(860, yStart), new Size2(200, 50))
            });
            Add(new ColoredRectangle {
                Color = Color.FromNonPremultiplied(31, 185, 219, 199), Transform = new Transform2(new Vector2(758, yStart + 60 - 2), new Size2(404, 79))
            });
            _shouldGuideLabel = new Label {
                Text = "Guide Me a Little", Transform = new Transform2(new Vector2(760, yStart + 60), new Size2(400, 75)), BackgroundColor = Color.FromNonPremultiplied(25, 75, 110, 255)
            };
            Add(_shouldGuideLabel);
            Add(UiButtons.MenuSmallBlue("Guide Me", new Vector2(700, yStart + 170), () =>
            {
                CurrentGameState.ShowObjectives = true;
                _shouldGuideLabel.Text          = "Guide Me a Little";
            }));
            Add(UiButtons.MenuSmallBlue("I'm A Pro", new Vector2(980, yStart + 170), () =>
            {
                CurrentGameState.ShowObjectives = false;
                _shouldGuideLabel.Text          = "I Know What I'm Doing";
            }));

            Input.On(Control.Start, StartGame);
            Add(UiButtons.Menu("Begin", new Vector2(780, 900), StartGame));
        }
Exemple #3
0
        public void Init()
        {
            _player           = new PlayerCharacterView(() => !_isInTheMiddleOfDialog);
            _dialogueAdvancer = new ScreenClickable(AdvanceChatVisuals);
            _clickUI          = new ClickUI();
            _clickUI.Add(GameObjects.Hud.HudBranch);
            _personMemoriesBranch = new ClickUIBranch("People", 1);
            _clickUI.Add(_personMemoriesBranch);
            _dialogMemoriesBranch = new ClickUIBranch("Dialogs", 1);
            _clickUI.Add(_dialogMemoriesBranch);
            _characterOptions = new List <IVisual>();
            var people = GameObjects.Characters.People.Where(p => p.GetOldDialogs().Count != 0);

            people.ForEachIndex((p, i) =>
            {
                var button = p.CreateButton(RememberDialogsWithPerson, i, people.Count());
                _characterOptions.Add(button);
                _personMemoriesBranch.Add(button);
            });
        }
Exemple #4
0
 public static string getAliance(this PlayerCharacterView instance)
 {
     return(instance.PlayerCharacter.jn());
 }
Exemple #5
0
 public static string getTitle(this PlayerCharacterView instance)
 {
     return(instance.PlayerCharacter.uz());
 }
Exemple #6
0
 public static string getGuild(this PlayerCharacterView instance)
 {
     return(instance.PlayerCharacter.jh());
 }