Files
crystall-punk-14/Content.Shared/Physics/SingularityPullController.cs

23 lines
573 B
C#
Raw Normal View History

#nullable enable
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
namespace Content.Server.GameObjects.Components.Singularity
{
public class SingularityPullController : VirtualController
{
public override IPhysicsComponent? ControlledComponent { protected get; set; }
public void StopPull()
{
LinearVelocity = Vector2.Zero;
}
public void Pull(Vector2 velocityDirection, float speed)
{
LinearVelocity = velocityDirection * speed;
}
}
}