Esempio n. 1
0
        private void Update()
        {
            if (parent.isSuspended)
            {
                return;
            }

            CharacterStateBase.SetActive(states.graphic, allowGraphic);
            CharacterStateBase.SetActive(states.gravity, allowGravity);
            CharacterStateBase.SetActive(states.input, allowInput);
            CharacterStateBase.SetActive(states.motor, allowMotor);
            CharacterStateBase.SetActive(states.movement, allowMovement);
            CharacterStateBase.SetActive(states.wallSlide, allowWallSlide);

            CharacterStateBase.UpdateState(states.gravity);
            CharacterStateBase.UpdateState(states.input);
            CharacterStateBase.UpdateState(states.wallSlide);

            CharacterStateBase.UpdateState(states.jump);
            CharacterStateBase.UpdateState(states.knockback);
            CharacterStateBase.UpdateState(states.slide);
            CharacterStateBase.UpdateState(states.wallDash);
            CharacterStateBase.UpdateState(states.wallJump);

            CharacterStateBase.UpdateState(states.motor);

            CharacterStateBase.UpdateState(states.movement);
            CharacterStateBase.UpdateState(states.graphic);
        }
Esempio n. 2
0
        private void LateUpdate()
        {
            if (parent.isSuspended)
            {
                return;
            }

            CharacterStateBase.SetActive(states.bounds, allowBounds);
            CharacterStateBase.SetActive(states.follow, allowFollow);
            CharacterStateBase.SetActive(states.movement, allowMovement);
            CharacterStateBase.SetActive(states.viewport, allowViewport);
            CharacterStateBase.SetActive(states.zoom, allowZoom);

            CharacterStateBase.UpdateState(states.bounds);

            CharacterStateBase.UpdateState(states.follow);
            CharacterStateBase.UpdateState(states.viewport);
            CharacterStateBase.UpdateState(states.zoom);

            CharacterStateBase.UpdateState(states.movement);
        }