示例#1
0
        public override void Use()
        {
            CurrentAction.ApplyStatsOnUse();

            if (shouldCancel)
            {
                FinishUsing(true);
            }
            else if (!CurrentAction.ValidateStats())
            {
                useState = ObjectUseState.Preparation;
                ExitAfterDelay(false);
            }
        }
示例#2
0
文件: Bed.cs 项目: dhon2407/LSW-alpha
        public override void Use()
        {
            CurrentAction.ApplyStatsOnUse();

            if (shouldCancel && !PlayerBuff.HasBuff <DeepSleep>())
            {
                FinishUsing(true);
            }
            else if (!CurrentAction.ValidateStats())
            {
                useState = ObjectUseState.Preparation;
                GameClock.ResetSpeed();
                ExitAfterDelay(false);
            }
        }
示例#3
0
        public override void Use()
        {
            CurrentAction.ApplyStatsOnUse();
            Player.anim.SetFloat("Horizontal", -1);
            SpriteControler.Instance.UpdateCharacterOrientation(CharacterOrientation.Left);

            if (shouldCancel)
            {
                FinishUsing(true);
            }
            else if (!CurrentAction.ValidateStats())
            {
                useState = ObjectUseState.Preparation;
                ExitAfterDelay(false);
            }
        }
示例#4
0
        public override void Use()
        {
            CurrentAction.ApplyStatsOnUse();

            if (breakFunctionality.isBroken)
            {
                SpriteControler.Instance.FaceDOWN();

                if (shouldCancel)
                {
                    ResetObjectState(true);
                    ProgressBar.HideUI(progressBarID);
                    PlayerAnimationHelper.ResetPlayer();
                }
                else if (breakFunctionality.AttemptFix())
                {
                    gameObject.GetComponent <Interactivity>().options = originalOptions;
                    breakFunctionality.isBroken = false;
                    PlayerAnimationHelper.ResetPlayer();
                    useState = ObjectUseState.Unused;
                    ResetObjectState(false);
                    ProgressBar.HideUI(progressBarID);
                }
            }
            else
            {
                SpriteControler.Instance.FaceLEFT();

                if (shouldCancel)
                {
                    FinishUsing(true);
                }
                else if (!CurrentAction.ValidateStats())
                {
                    useState = ObjectUseState.Preparation;
                    ExitAfterDelay(false);
                }
            }
        }