public override void Use() { CurrentAction.ApplyStatsOnUse(); if (shouldCancel) { FinishUsing(true); } else if (!CurrentAction.ValidateStats()) { useState = ObjectUseState.Preparation; ExitAfterDelay(false); } }
public override void Use() { CurrentAction.ApplyStatsOnUse(); if (shouldCancel && !PlayerBuff.HasBuff <DeepSleep>()) { FinishUsing(true); } else if (!CurrentAction.ValidateStats()) { useState = ObjectUseState.Preparation; GameClock.ResetSpeed(); ExitAfterDelay(false); } }
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); } }
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); } } }