예제 #1
0
    // Token: 0x0600057D RID: 1405 RVA: 0x0002F354 File Offset: 0x0002D554
    private void UpdateHints()
    {
        Player localPlayer = Player.m_localPlayer;

        if (!this.m_keyHintsEnabled || localPlayer == null || localPlayer.IsDead() || Chat.instance.IsChatDialogWindowVisible())
        {
            this.m_buildHints.SetActive(false);
            this.m_combatHints.SetActive(false);
            return;
        }
        bool activeSelf  = this.m_buildHints.activeSelf;
        bool activeSelf2 = this.m_buildHints.activeSelf;

        ItemDrop.ItemData currentWeapon = localPlayer.GetCurrentWeapon();
        if (localPlayer.InPlaceMode())
        {
            this.m_buildHints.SetActive(true);
            this.m_combatHints.SetActive(false);
            return;
        }
        if (localPlayer.GetShipControl())
        {
            this.m_buildHints.SetActive(false);
            this.m_combatHints.SetActive(false);
            return;
        }
        if (currentWeapon != null && (currentWeapon != localPlayer.m_unarmedWeapon.m_itemData || localPlayer.IsTargeted()))
        {
            this.m_buildHints.SetActive(false);
            this.m_combatHints.SetActive(true);
            bool flag    = currentWeapon.m_shared.m_itemType == ItemDrop.ItemData.ItemType.Bow;
            bool active  = !flag && currentWeapon.HavePrimaryAttack();
            bool active2 = !flag && currentWeapon.HaveSecondaryAttack();
            this.m_bowDrawGP.SetActive(flag);
            this.m_bowDrawKB.SetActive(flag);
            this.m_primaryAttackGP.SetActive(active);
            this.m_primaryAttackKB.SetActive(active);
            this.m_secondaryAttackGP.SetActive(active2);
            this.m_secondaryAttackKB.SetActive(active2);
            return;
        }
        this.m_buildHints.SetActive(false);
        this.m_combatHints.SetActive(false);
    }