コード例 #1
0
    // Token: 0x06001BF4 RID: 7156 RVA: 0x000874E8 File Offset: 0x000856E8
    public void OnMenuItemPressed()
    {
        InventoryAbilityItem component = this.NavigationManager.CurrentMenuItem.GetComponent <InventoryAbilityItem>();

        if (component && !component.HasAbility)
        {
            if (this.PressUngainedAbilityOptionSound)
            {
                Sound.Play(this.PressUngainedAbilityOptionSound.GetSound(null), base.transform.position, null);
            }
            return;
        }
        InventoryItemHelpText component2 = this.NavigationManager.CurrentMenuItem.GetComponent <InventoryItemHelpText>();

        if (component2)
        {
            SuspensionManager.SuspendAll();
            MessageBox messageBox = UI.MessageController.ShowMessageBoxB(this.HelpMessageBox, component2.HelpMessage, Vector3.zero, float.PositiveInfinity);
            if (messageBox)
            {
                messageBox.SetAvatar(component2.Avatar);
                messageBox.OnMessageScreenHide += new Action(this.OnMessageScreenHide);
            }
            else
            {
                SuspensionManager.ResumeAll();
            }
            this.m_currentCloseMessageSound = ((!component) ? this.CloseStatisticsMessageSound : this.CloseAbilityMessageSound);
            if (component && this.PressAbilityOptionSound)
            {
                Sound.Play(this.PressAbilityOptionSound.GetSound(null), base.transform.position, null);
            }
        }
    }
コード例 #2
0
    // Token: 0x06001BF8 RID: 7160
    public void UpdateItems()
    {
        SeinCharacter sein = Characters.Sein;

        if (sein == null)
        {
            return;
        }
        this.CompletionText.SetMessage(new MessageDescriptor(GameWorld.Instance.CompletionPercentage + "%"));
        this.DeathText.SetMessage(new MessageDescriptor(SeinDeathCounter.Count.ToString()));
        this.HealthUpgradesText.SetMessage(new MessageDescriptor(sein.Mortality.Health.HealthUpgradesCollected + " / " + 12));
        this.EnergyUpgradesText.SetMessage(new MessageDescriptor(sein.Energy.EnergyUpgradesCollected + " / " + 15));
        this.SkillPointUniquesText.SetMessage(new MessageDescriptor((sein.Inventory.SkillPointsCollected & 63) + " / " + 33));
        GameTimer timer = GameController.Instance.Timer;

        this.TimeText.SetMessage(new MessageDescriptor(string.Format("{0:D2}:{1:D2}:{2:D2}", timer.Hours, timer.Minutes, timer.Seconds)));
        InventoryAbilityItem component = this.NavigationManager.CurrentMenuItem.GetComponent <InventoryAbilityItem>();

        if (component)
        {
            this.AbilityNameText.gameObject.SetActive(true);
            this.AbilityItemHighlight.SetActive(true);
            this.AbilityItemHighlight.transform.position = component.transform.position;
            if (component.HasAbility)
            {
                this.AbilityNameText.SetMessageProvider(component.AbilityName);
            }
            else
            {
                this.AbilityNameText.SetMessageProvider(this.LockedMessageProvider);
            }
        }
        else
        {
            this.AbilityNameText.gameObject.SetActive(false);
            this.AbilityItemHighlight.SetActive(false);
        }
        if (this.Difficulty)
        {
            this.Difficulty.RefreshText();
        }
    }