예제 #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);
                }
            }
        }