コード例 #1
0
    public override void DrawMe()
    {
        InventoryBox.DrawMe();

        if (ItemGrid.IsClicked())
        {
            _maestro.PlayOneShot(ButtonSound);
            _currentItem = (InventoryItem)ItemGrid.SelectedObject;
            LoadItemInCommandBar(_currentItem);
        }

        CommandBar.DrawMe();
        ItemInfoLabel.DrawMe();

        if (EquipItemButton.IsClicked())
        {
            _maestro.PlayOneShot(ButtonSound);
            _controller.EquipItem(_currentItem);
        }

        if (UseItemButton.IsClicked())
        {
            _maestro.PlayOneShot(ButtonSound);
            _controller.UseItem(_currentItem);
        }
    }
コード例 #2
0
    /// <summary>
    /// Determines whether the message box is clicked.
    /// </summary>
    /// <returns>
    /// <c>true</c> if this instance is clicked; otherwise, <c>false</c>.
    /// </returns>
    public bool IsClicked()
    {
        background.DrawMe();
        message.DrawMe();

        return(okButton.IsClicked());
    }
コード例 #3
0
    public override void DrawMe()
    {
        EquipmentBox.DrawMe();

        ArmorIcon.DrawMe();
        WeaponIcon.DrawMe();
        AccessoryIcon.DrawMe();
        ArmorLabel.DrawMe();
        WeaponLabel.DrawMe();
        AccessoryLabel.DrawMe();

        if (ChangeWeapon.IsClicked())
        {
            _maestro.PlayOneShot(ButtonSound);
            _controller.OpenFilteredItems(ItemType.Weapon);
        }

        if (ChangeArmor.IsClicked())
        {
            _maestro.PlayOneShot(ButtonSound);
            _controller.OpenFilteredItems(ItemType.Armor);
        }

        if (ChangeAccessory.IsClicked())
        {
            _maestro.PlayOneShot(ButtonSound);
            _controller.OpenFilteredItems(ItemType.Accessory);
        }
    }
コード例 #4
0
    public override void DrawMe()
    {
        Background.DrawMe();
        SpeakerName.DrawMe();
        SpeakerText.DrawMe();

        if (_currentContent == null)
        {
            return;
        }

        for (int i = 0; i < AdvanceButtons.Count; i++)
        {
            if (i >= _currentContent.Options.Count)
            {
                return;
            }

            AsvarduilButton button = AdvanceButtons[i];

            if ((button.IsClicked() || _control.GetAxisDown(button.ActivationAxis)) &&
                Time.time >= _lastAdvance + AdvanceLockout)
            {
                _dialogueController.AdvanceThread(_currentContent.Options[i].TargetID);
                break;
            }
        }
    }
コード例 #5
0
ファイル: QuestGUI.cs プロジェクト: facybenbook/HerosJourney
    public override void DrawMe()
    {
        GUI.skin = Skin;

        Background.DrawMe();
        QuestTitle.DrawMe();
        QuestDetails.DrawMe();
    }
コード例 #6
0
    public override void DrawMe()
    {
        PartySelectBox.DrawMe();
        MemberNameLabel.DrawMe();

        if (NextButton.IsClicked())
        {
            _controller.ChangeMember(1);
        }

        if (LastButton.IsClicked())
        {
            _controller.ChangeMember(-1);
        }
    }
コード例 #7
0
    public override void DrawMe()
    {
        GUI.skin = Skin;

        Background.DrawMe();

        if (Skills.IsClicked())
        {
            _maestro.PlayOneShot(ButtonSound);
            _currentAbility = (Ability)Skills.SelectedObject;
            LoadAbilityDetails(_currentAbility);
        }

        CommandBar.DrawMe();
        DetailLabel.DrawMe();
    }
コード例 #8
0
ファイル: TitleGUI.cs プロジェクト: facybenbook/HerosJourney
    public override void DrawMe()
    {
        GUI.skin = skin;

        Background.DrawMe();
        ThanksHeader.DrawMe();
        ThanksContributors.DrawMe();
        SpecialThanksHeader.DrawMe();
        SpecialThanksContributors.DrawMe();

        _backClicked = BackButton.IsClicked();
        if (_backClicked)
        {
            _maestro.PlaySoundEffect(buttonSound);
        }
    }
コード例 #9
0
    public override void DrawMe()
    {
        StatViewBox.DrawMe();

        HealthIcon.DrawMe();
        HealthLabel.DrawMe();

        MagicIcon.DrawMe();
        AttackIcon.DrawMe();
        MaxAtbIcon.DrawMe();
        AtbSpeedIcon.DrawMe();
        MagicLabel.DrawMe();
        AttackLabel.DrawMe();
        MaxAtbLabel.DrawMe();
        AtbSpeedLabel.DrawMe();
    }
コード例 #10
0
    public void OnGUI()
    {
        switch (_Phase)
        {
        case SpeechPhase.CanTalk:
            GUI.skin = MapSkin;
            if (SpeechNotice.IsClicked())
            {
                _Maestro.PlaySoundEffect(ButtonSound);

                _Phase         = SpeechPhase.Conversation;
                _DialogueIndex = _DialogueStartIndex;
                TransitionTextbox();
            }
            break;

        case SpeechPhase.Conversation:
            GUI.skin = DialogueSkin;
            TextBackground.DrawMe();
            Speaker.DrawMe();
            Content.DrawMe();

            for (int i = 0; i < DialogueLines[_DialogueIndex].Buttons.Count; i++)
            {
                DialogueButton button = DialogueLines[_DialogueIndex].Buttons[i];
                if (button.Button.IsClicked())
                {
                    _Maestro.PlaySoundEffect(ButtonSound);

                    _DialogueIndex      = button.DialogueIndex;
                    _DialogueStartIndex = button.NewDialogueStartIndex;
                    TransitionTextbox();
                }
            }
            break;

        default:
            break;
        }
    }
コード例 #11
0
    public float IsMoved()
    {
        if (!IsInteractable)
        {
            return(Value);
        }

        Label.DrawMe();

        GUI.depth = Layer;
        GUI.color = Tint;
        Rect sliderRect = GetElementRect(Dimensions);

        if (IsHorizontal)
        {
            Value = GUI.HorizontalSlider(sliderRect, Value, MinValue, MaxValue);
            return(Value);
        }

        Value = GUI.VerticalSlider(sliderRect, Value, MaxValue, MinValue);
        return(Value);
    }
コード例 #12
0
    public void OnGUI()
    {
        if (!DialogueAvailable)
        {
            return;
        }

        GUI.skin = skin;

        Background.DrawMe();
        SpeakerName.DrawMe();
        SpeakerText.DrawMe();

        bool userWantsToAdvance = NextButton.IsClicked() ||
                                  Input.GetButtonUp("Interact");

        if (Time.time >= _nextAdvance &&
            userWantsToAdvance)
        {
            DialogueText text = _currentThread.AdvanceSpeakerText();
            if (text != default(DialogueText))
            {
                PresentLine(text);
            }

            if (_currentThread.TextExhausted)
            {
                if (DebugMode)
                {
                    Debug.Log("Dialog text is exhausted.");
                }

                PlayerHasControl(true);
                HideElements();
            }
        }
    }
コード例 #13
0
	public virtual void DrawMe()
	{
		Background.DrawMe();
		WindowName.DrawMe();
	}