22
Content.Shared/Physics/SingularityPullController.cs
Normal file
22
Content.Shared/Physics/SingularityPullController.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
#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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user