Ejemplo n.º 1
0
        private void StopContainingBreaths()
        {
            this._isContainingBreaths = false;
            if (this._currentCupFill != null)
            {
                if (this._currentCupFill.FillAmount == BreathToolFill.TotalFills)
                {
                    GameData.Instance.Increment10BreathCount();

                    if (GameData.Instance.TutorialIndex == 0)
                    {
                        GameData.Instance.TutorialIndex++;
                    }
                }

                this._currentCupFill.IsContained = false;
                this._currentCupFill.transform.SetParent(null, true);
                this._currentCupFill = null;
                this.breathToolFillUi.Hide();
            }

            this.cup.IsVisible = false;
            this.releaseButtonImage.GetComponent <HeldButtonUi>().Complete(null);
            this.centerMenuButton.SetCenterActive(false);
        }
Ejemplo n.º 2
0
        private void StartContainingBreaths()
        {
            this._isContainingBreaths = true;
            this._currentCupFill      =
                Instantiate(this.cupFillPrefab, this.cup.transform).GetComponent <BreathToolFill>();
            this.cup.IsVisible = true;
            var earlyGameEasyMode = GameData.Instance.IntroductionIndex < 2;

            this.cup.IsOpaque = GameData.Instance.Current10BreathCount > (earlyGameEasyMode ? 1 : 0);
            this.breathToolFillUi.IsActive = earlyGameEasyMode && !this.cup.IsOpaque;
            this.releaseButtonImage.GetComponent <HeldButtonUi>().SetActive(this.IsReleasingAllowed);
            this.Center(true);
            this.centerMenuButton.SetCenterActive(true);
        }