Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 private void Start()
 {
     GamePauseHandler.SubscribeCloseEvent(EscCloseEvent);
 }