Show / Hide Table of Contents

Class NPCSteeringSystem

Inheritance
System.Object
SharedNPCSteeringSystem
NPCSteeringSystem
Namespace: Content.Server.NPC.Systems
Assembly: Content.Server.dll
Syntax
public sealed class NPCSteeringSystem : SharedNPCSteeringSystem

Fields

| Improve this Doc View Source

AntiStuck

Enabled antistuck detection so if an NPC is in the same spot for a while it will re-path.

Declaration
public bool AntiStuck
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

Directions

Declaration
public static readonly Vector2[] Directions
Field Value
Type Description
Vector2[]

Methods

| Improve this Doc View Source

Initialize()

Declaration
public override void Initialize()
| Improve this Doc View Source

PrunePath(EntityUid, MapCoordinates, Vector2, List<PathPoly>)

We may be pathfinding and moving at the same time in which case early nodes may be out of date.

Declaration
public void PrunePath(EntityUid uid, MapCoordinates mapCoordinates, Vector2 direction, List<PathPoly> nodes)
Parameters
Type Name Description
EntityUid uid
Robust.Shared.Map.MapCoordinates mapCoordinates
Vector2 direction
List<PathPoly> nodes
| Improve this Doc View Source

Register(EntityUid, EntityCoordinates, NPCSteeringComponent)

Adds the AI to the steering system to move towards a specific target

Declaration
public NPCSteeringComponent Register(EntityUid uid, EntityCoordinates coordinates, NPCSteeringComponent component = null)
Parameters
Type Name Description
EntityUid uid
Robust.Shared.Map.EntityCoordinates coordinates
NPCSteeringComponent component
Returns
Type Description
NPCSteeringComponent
| Improve this Doc View Source

Shutdown()

Declaration
public override void Shutdown()
| Improve this Doc View Source

TryRegister(EntityUid, EntityCoordinates, NPCSteeringComponent)

Attempts to register the entity. Does nothing if the coordinates already registered.

Declaration
public bool TryRegister(EntityUid uid, EntityCoordinates coordinates, NPCSteeringComponent component = null)
Parameters
Type Name Description
EntityUid uid
Robust.Shared.Map.EntityCoordinates coordinates
NPCSteeringComponent component
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Unregister(EntityUid, NPCSteeringComponent)

Stops the steering behavior for the AI and cleans up.

Declaration
public void Unregister(EntityUid uid, NPCSteeringComponent component = null)
Parameters
Type Name Description
EntityUid uid
NPCSteeringComponent component
| Improve this Doc View Source

Update(Single)

Declaration
public override void Update(float frameTime)
Parameters
Type Name Description
System.Single frameTime
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾