Class SharedMoverController
Handles player and NPC mob movement.
NPCs are handled server-side only.
Inheritance
System.Object
Robust.Shared.GameObjects.EntitySystem
Robust.Shared.Physics.Controllers.VirtualController
SharedMoverController
Implements
Robust.Shared.GameObjects.IEntitySystem
Robust.Shared.GameObjects.IEntityEventSubscriber
Robust.Shared.IoC.IPostInjectInit
Assembly: Content.Shared.dll
Syntax
public abstract class SharedMoverController : VirtualController, IEntitySystem, IEntityEventSubscriber, IPostInjectInit
Fields
|
Improve this Doc
View Source
CanMoveInAirQuery
Declaration
protected EntityQuery<CanMoveInAirComponent> CanMoveInAirQuery
Field Value
|
Improve this Doc
View Source
MobMoverQuery
Declaration
protected EntityQuery<MobMoverComponent> MobMoverQuery
Field Value
|
Improve this Doc
View Source
ModifierQuery
Declaration
protected EntityQuery<MovementSpeedModifierComponent> ModifierQuery
Field Value
|
Improve this Doc
View Source
MoverQuery
Declaration
protected EntityQuery<InputMoverComponent> MoverQuery
Field Value
|
Improve this Doc
View Source
NoRotateQuery
Declaration
protected EntityQuery<NoRotateOnMoveComponent> NoRotateQuery
Field Value
|
Improve this Doc
View Source
Physics
Declaration
protected readonly SharedPhysicsSystem Physics
Field Value
Type |
Description |
Robust.Shared.Physics.Systems.SharedPhysicsSystem |
|
|
Improve this Doc
View Source
PhysicsQuery
Declaration
protected EntityQuery<PhysicsComponent> PhysicsQuery
Field Value
Type |
Description |
EntityQuery<Robust.Shared.Physics.Components.PhysicsComponent> |
|
|
Improve this Doc
View Source
PullableQuery
Declaration
protected EntityQuery<SharedPullableComponent> PullableQuery
Field Value
|
Improve this Doc
View Source
RelayQuery
Declaration
protected EntityQuery<RelayInputMoverComponent> RelayQuery
Field Value
|
Improve this Doc
View Source
RelayTargetQuery
Declaration
protected EntityQuery<MovementRelayTargetComponent> RelayTargetQuery
Field Value
|
Improve this Doc
View Source
Timing
Declaration
protected readonly IGameTiming Timing
Field Value
Type |
Description |
Robust.Shared.Timing.IGameTiming |
|
|
Improve this Doc
View Source
UsedMobMovement
Cache the mob movement calculation to re-use elsewhere.
Declaration
public Dictionary<EntityUid, bool> UsedMobMovement
Field Value
Type |
Description |
Dictionary<EntityUid, System.Boolean> |
|
|
Improve this Doc
View Source
XformQuery
Declaration
protected EntityQuery<TransformComponent> XformQuery
Field Value
Type |
Description |
EntityQuery<TransformComponent> |
|
Properties
|
Improve this Doc
View Source
CameraRotationLocked
Declaration
public bool CameraRotationLocked { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
DiagonalMovementEnabled
Declaration
public bool DiagonalMovementEnabled { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
CanSound()
Declaration
protected abstract bool CanSound()
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetParentGridAngle(InputMoverComponent)
Declaration
public Angle GetParentGridAngle(InputMoverComponent mover)
Parameters
Returns
|
Improve this Doc
View Source
GetVelocityInput(InputMoverComponent)
Declaration
public (Vector2 Walking, Vector2 Sprinting) GetVelocityInput(InputMoverComponent mover)
Parameters
Returns
Type |
Description |
System.ValueTuple<Vector2, Vector2> |
|
|
Improve this Doc
View Source
HandleMobMovement(EntityUid, InputMoverComponent, EntityUid, PhysicsComponent, TransformComponent, Single)
Movement while considering actionblockers, weightlessness, etc.
Declaration
protected void HandleMobMovement(EntityUid uid, InputMoverComponent mover, EntityUid physicsUid, PhysicsComponent physicsComponent, TransformComponent xform, float frameTime)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
InputMoverComponent |
mover |
|
EntityUid |
physicsUid |
|
Robust.Shared.Physics.Components.PhysicsComponent |
physicsComponent |
|
TransformComponent |
xform |
|
System.Single |
frameTime |
|
|
Improve this Doc
View Source
HandleShuttleInput(EntityUid, ShuttleButtons, UInt16, Boolean)
Declaration
protected virtual void HandleShuttleInput(EntityUid uid, ShuttleButtons button, ushort subTick, bool state)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
ShuttleButtons |
button |
|
System.UInt16 |
subTick |
|
System.Boolean |
state |
|
|
Improve this Doc
View Source
Initialize()
Declaration
public override void Initialize()
Overrides
Robust.Shared.Physics.Controllers.VirtualController.Initialize()
|
Improve this Doc
View Source
LerpRotation(EntityUid, InputMoverComponent, Single)
Declaration
public void LerpRotation(EntityUid uid, InputMoverComponent mover, float frameTime)
Parameters
|
Improve this Doc
View Source
ResetCamera(EntityUid)
Declaration
public void ResetCamera(EntityUid uid)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
|
Improve this Doc
View Source
RotateCamera(EntityUid, Angle)
Declaration
public void RotateCamera(EntityUid uid, Angle angle)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
Angle |
angle |
|
|
Improve this Doc
View Source
SetMoveInput(InputMoverComponent, MoveButtons)
Declaration
protected void SetMoveInput(InputMoverComponent component, MoveButtons buttons)
Parameters
|
Improve this Doc
View Source
SetRelay(EntityUid, EntityUid)
Sets the relay entity and marks the component as dirty. This only exists because people have previously
forgotten to Dirty(), so fuck you, you have to use this method now.
Declaration
public void SetRelay(EntityUid uid, EntityUid relayEntity)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
EntityUid |
relayEntity |
|
|
Improve this Doc
View Source
SetSprinting(InputMoverComponent, UInt16, Boolean)
Declaration
public void SetSprinting(InputMoverComponent component, ushort subTick, bool walking)
Parameters
Type |
Name |
Description |
InputMoverComponent |
component |
|
System.UInt16 |
subTick |
|
System.Boolean |
walking |
|
|
Improve this Doc
View Source
SetVelocityDirection(InputMoverComponent, Direction, UInt16, Boolean)
Toggles one of the four cardinal directions. Each of the four directions are
composed into a single direction vector, . Enabling
opposite directions will cancel each other out, resulting in no direction.
Declaration
public void SetVelocityDirection(InputMoverComponent component, Direction direction, ushort subTick, bool enabled)
Parameters
Type |
Name |
Description |
InputMoverComponent |
component |
|
Direction |
direction |
|
System.UInt16 |
subTick |
|
System.Boolean |
enabled |
|
|
Improve this Doc
View Source
Shutdown()
Declaration
public override void Shutdown()
Overrides
Robust.Shared.GameObjects.EntitySystem.Shutdown()
|
Improve this Doc
View Source
UpdateAfterSolve(Boolean, Single)
Declaration
public override void UpdateAfterSolve(bool prediction, float frameTime)
Parameters
Type |
Name |
Description |
System.Boolean |
prediction |
|
System.Single |
frameTime |
|
Overrides
Robust.Shared.Physics.Controllers.VirtualController.UpdateAfterSolve(System.Boolean, System.Single)
|
Improve this Doc
View Source
UseMobMovement(EntityUid)
Declaration
public bool UseMobMovement(EntityUid uid)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
Returns
Type |
Description |
System.Boolean |
|
Implements
Robust.Shared.GameObjects.IEntitySystem
Robust.Shared.GameObjects.IEntityEventSubscriber
Robust.Shared.IoC.IPostInjectInit