public override void BeginUsing() { SpriteControler.Instance.UpdateCharacterOrientation(useableFunctionality.characterOrientationOnUseBegin); GameLibOfMethods.cantMove = true; GameLibOfMethods.canInteract = false; GameLibOfMethods.doingSomething = true; CurrentAction.BeginAction(); useState = ObjectUseState.InUse; GamePauseHandler.SubscribeCloseEvent(EscCloseEvent); }
public override void FinishUsing(bool cancel) { ResetObjectState(cancel); if (pcFunctions == null) { pcFunctions = FindObjectOfType <HomePCInteractions>(); } pcFunctions.FinishActions(); void ResetAction() { SpriteControler.Instance.ChangeSortingOrder(0); GetComponent <SpriteRenderer>().sortingOrder = 0; } PlayerAnimationHelper.ResetAnimations(); PlayerCommands.WalkBackToLastPosition(ResetAction); GamePauseHandler.UnSubscribeCloseEvent(EscCloseEvent); }
private void Start() { GamePauseHandler.SubscribeCloseEvent(EscCloseEvent); }