예제 #1
0
    // Token: 0x06000627 RID: 1575 RVA: 0x0003484C File Offset: 0x00032A4C
    private void Update()
    {
        if (!this.m_rootPanel.activeSelf)
        {
            this.m_hiddenFrames++;
            return;
        }
        this.m_hiddenFrames = 0;
        if (!this.m_trader)
        {
            this.Hide();
            return;
        }
        Player localPlayer = Player.m_localPlayer;

        if (localPlayer == null || localPlayer.IsDead() || localPlayer.InCutscene())
        {
            this.Hide();
            return;
        }
        if (Vector3.Distance(this.m_trader.transform.position, Player.m_localPlayer.transform.position) > this.m_hideDistance)
        {
            this.Hide();
            return;
        }
        if (InventoryGui.IsVisible() || Minimap.IsOpen())
        {
            this.Hide();
            return;
        }
        if ((Chat.instance == null || !Chat.instance.HasFocus()) && !global::Console.IsVisible() && !Menu.IsVisible() && TextViewer.instance && !TextViewer.instance.IsVisible() && !localPlayer.InCutscene() && (ZInput.GetButtonDown("JoyButtonB") || Input.GetKeyDown(KeyCode.Escape) || ZInput.GetButtonDown("Use")))
        {
            ZInput.ResetButtonStatus("JoyButtonB");
            this.Hide();
        }
        this.UpdateBuyButton();
        this.UpdateSellButton();
        this.UpdateRecipeGamepadInput();
        this.m_coinText.text = this.GetPlayerCoins().ToString();
    }