Exemplo n.º 1
0
 public void Init()
 {
     _createCharacterLabel = new Label {
         BackgroundColor = Color.Transparent, TextColor = Color.White, Text = "Create Your Character", Transform = new Transform2(Sizes.LargeLabel)
     };
     _charName = new Label {
         BackgroundColor = Color.Black, TextColor = Color.White, Text = "Name", Transform = new Transform2(Sizes.MediumLabel)
     };
     _charSexLabel = new Label {
         BackgroundColor = Color.Black, TextColor = Color.White, Text = "Make", Transform = new Transform2(Sizes.MediumLabel)
     };
     _startGameButton = new ImageTextButton("Start Game",
                                            "Images/Menu/button-default",
                                            "Images/Menu/button-hover",
                                            "Images/Menu/button-pressed",
                                            new Transform2(new Vector2(800 - 100, 750 - 22),
                                                           new Size2(200, 44)), StartGame);
     _maleButton = new ImageTextButton("Male",
                                       "Images/Menu/button-default",
                                       "Images/Menu/button-hover",
                                       "Images/Menu/button-pressed",
                                       new Transform2(new Vector2(800 - 100, 650 - 22),
                                                      new Size2(200, 44)), () => _sex = CharacterSex.Male);
     _femaleButton = new ImageTextButton("Female",
                                         "Images/Menu/button-default",
                                         "Images/Menu/button-hover",
                                         "Images/Menu/button-pressed",
                                         new Transform2(new Vector2(800 - 100, 600 - 22),
                                                        new Size2(200, 44)), () => _sex = CharacterSex.Female);
     _ui = new ClickUI();
     _ui.Add(_startGameButton);
     _ui.Add(_maleButton);
     _ui.Add(_femaleButton);
 }
Exemplo n.º 2
0
 private void Push(IJamView view)
 {
     StopLoitering();
     _subview = view;
     _subview.Init();
     _clickUi.Add(_subview.ClickUiBranch);
 }
Exemplo n.º 3
0
 private void Enable()
 {
     _isGameOver = true;
     _clickUI.Add(_interceptLayer);
     _clickUI.Add(_branch);
     _fade.Start(() => _black.Color = Color.Black);
     AudioPlayer.Instance.StopAll();
     Sound.SoundEffect("SFX/death-swell.mp3").Play();
 }
Exemplo n.º 4
0
 private void RememberDialog(string dialog, DialogueElement[] elements)
 {
     _personName     = _selectedPerson.CreateChatNameBox();
     _elements       = ((IEnumerable <DialogueElement>)elements).GetEnumerator();
     _locationMemory = CurrentGameState.RememberLocation(dialog);
     _clickUI.Remove(_dialogMemoriesBranch);
     _clickUI.Remove(_personMemoriesBranch);
     _clickUI.Remove(GameObjects.Hud.HudBranch);
     _clickUI.Add(_dialogueAdvancer);
     _personImage           = _selectedPerson.CreateFacingImage(Expression.Default);
     _reader                = new Reader(elements.Select(e => e.Line).ToArray(), EndMemory);
     _isInTheMiddleOfDialog = true;
 }
Exemplo n.º 5
0
 public void Init()
 {
     _clickUI = new ClickUI();
     _credits = UiButtons.Menu("Credits", new Vector2(UI.OfScreenWidth(0.5f) - 180, 900), () => Scene.NavigateTo(GameResources.CreditsSceneName));
     _chatBox = new ChatBox("", 1670, DefaultFont.Value, CurrentOptions.MillisPerTextCharacter, 32)
     {
         SoundsEnabled = false
     };
     _clickUI.Add(_credits);
     _clickUI.Add(new ScreenClickable(_chatBox.CompletelyDisplayMessage));
     CalculateLinchPins();
     GenerateWallOfText();
 }
Exemplo n.º 6
0
 protected GameOverScene(string image, string gameOverReason)
 {
     _image          = image;
     _gameOverReason = gameOverReason;
     _clickUI        = new ClickUI();
     _clickUI.Add(new ScreenClickable(() => { World.NavigateToScene("MainMenu"); }));
 }
 private void Show()
 {
     if (GameWorld.CurrentCharacter.Team.IsIncludedIn(TeamGroup.NeutralsAndEnemies))
     {
         return;
     }
     _clickUI.Add(_branch);
     _show = true;
 }
Exemplo n.º 8
0
 public void Init()
 {
     _gameState   = CurrentGameState.StartNewGame();
     _padLocation = 900;
     _clock       = _gameState.Clock;
     _clickUi.Add(_branch);
     _overlay = new Overlay();
     _branch.Add(_overlay.Branch);
     _pad           = new Pad(_branch);
     _gameState.Pad = _pad;
     _room          = new RoomUI();
     _thoughts      = new ThoughtUI();
     _branch.Add(_thoughts.Branch);
     _dev = new DevView();
     _branch.Add(_dev.Branch);
     _branch.Add(_room.Branch);
     InitAutomatons();
     InitSubscriptions();
 }
        private void PresentOptions()
        {
            if (!GameWorld.CurrentCharacter.Team.IsIncludedIn(TeamGroup.Friendlies))
            {
                return;
            }

            _showingOptions = true;
            _clickUI.Add(_branch);
        }
Exemplo n.º 10
0
 public void Init()
 {
     _clickUI = new ClickUI();
     _clickUI.Add(new ScreenClickable(NavigateToMainMenu));
     _untilTransition = new Timer(NavigateToMainMenu, 8000);
     Input.ClearTransientBindings();
     Input.On(Control.Start, NavigateToMainMenu);
     Input.On(Control.A, NavigateToMainMenu);
     Audio.PlayMusicOnce("Logo", 1);
 }
Exemplo n.º 11
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);
            });
        }
Exemplo n.º 12
0
        public void Show(bool isReady)
        {
            if (GameWorld.CurrentCharacter.Team.IsIncludedIn(TeamGroup.NeutralsAndEnemies))
            {
                return;
            }

            _confirmButton.IsEnabled = isReady;
            _isReady = isReady;
            _clickUI.Add(_branch);
            _show = true;
        }
Exemplo n.º 13
0
 public void AddClickable(ClickableUIElement obj)
 {
     ClickUi.Add(obj);
     if (obj is IVisual)
     {
         Add((IVisual)obj);
     }
     if (obj is IAutomaton)
     {
         Add((IAutomaton)obj);
     }
 }
Exemplo n.º 14
0
        public void Init()
        {
#if DEBUG
            GameObjects.InitIfNeeded();
#endif
            Input.ClearTransientBindings();
            _clickUi        = new ClickUI();
            _tutorialBranch = new ClickUIBranch("Tutorial", 10);
            _clickUi.Add(_tutorialBranch);
            _automata.Add(_clickUi);
            OnInit();
        }
Exemplo n.º 15
0
 private void InitUiElements()
 {
     _subview    = new NoSubView();
     _objectives = new ObjectivesView();
     _objectives.Init();
     _investigateRoomBranch = new ClickUIBranch("Location Investigation", 1);
     _locationNameLabel     = UiLabels.HeaderLabel(_location.Name, Color.White);
     _clickUi        = new ClickUI();
     _tutorialBranch = new ClickUIBranch("Tutorial", 25);
     _tutorialBranch.Add(_objectives.TutorialButton);
     _clickUi.Add(_tutorialBranch);
 }
Exemplo n.º 16
0
        public void Init()
        {
            _btn = new ImageTextButton("New Game",
                                       "Images/Menu/button-default",
                                       "Images/Menu/button-hover",
                                       "Images/Menu/button-pressed",
                                       new Transform2(new Vector2(800 - 100, 750 - 22),
                                                      new Size2(200, 44)), () => World.NavigateToScene("CharacterCreation"));

            _ui = new ClickUI();
            _ui.Add(_btn);
            Audio.PlayMusic("Music/maintheme");
        }
Exemplo n.º 17
0
        public HudView(ClickUI clickUi) : base(true)
        {
            Add(new InGameMenu(clickUi));
            Add(new ActionConfirmMenu(clickUi));
            Add(new EquippedWeaponView(new Point(UI.OfScreenWidth(0.834f), UI.OfScreenHeight(0.86f))));
            Add(new CurrentCharacterView(new Point(UI.OfScreenWidth(0.01f), UI.OfScreenHeight(0.86f))));
            Add(new AttackPreview());
            Add(new TeamTurnHudDecor());
            Add(new ActionOptionsMenu(clickUi));
            Add(new GameOverMenu(clickUi));
            Add(new SwitchWeaponsMenu(clickUi));
            Add(new CharacterStatusView(new Point(UI.OfScreenWidth(0.33f), UI.OfScreenHeight(0.17f))));
            var dialogs = new InGameDialogueLayout();

            clickUi.Add(dialogs.Branch);
            Add(dialogs);
        }
Exemplo n.º 18
0
 protected void Add(VisualClickableUIElement e)
 {
     _clickUi.Add(e);
     _visuals.Add(e);
 }
Exemplo n.º 19
0
 protected void AddUi(IJamView v)
 {
     _clickUi.Add(v.ClickUiBranch);
     _visuals.Add(v);
     _automata.Add(v);
 }
Exemplo n.º 20
0
 protected void AddUi(ClickableUIElement e)
 {
     _clickUi.Add(e);
 }
Exemplo n.º 21
0
 public void PresentOptions()
 {
     _clickUI.Add(_interceptLayer);
     _clickUI.Add(_branch);
     _showingOptions = true;
 }