예제 #1
0
        public override void UpdateAfterProcessing()
        {
            if (ControlledComponent == null)
            {
                return;
            }

            if (ControlledComponent.Owner.IsWeightless())
            {
                if (ActionBlockerSystem.CanMove(ControlledComponent.Owner) &&
                    ControlledComponent.IsColliding(Vector2.Zero, false))
                {
                    Stop();
                }

                return;
            }

            LinearVelocity *= Decay;

            if (LinearVelocity.Length < 0.001)
            {
                Stop();
            }
        }
예제 #2
0
        public override void UpdateAfterProcessing()
        {
            if (ControlledComponent == null)
            {
                return;
            }

            if (_physicsManager.IsWeightless(ControlledComponent.Owner.Transform.Coordinates))
            {
                if (ControlledComponent.IsColliding(Vector2.Zero, false))
                {
                    Stop();
                }

                return;
            }

            LinearVelocity *= Decay;

            if (LinearVelocity.Length < 0.001)
            {
                Stop();
            }
        }