Class AITarget
Inheritance
System.Object
AITarget
Assembly: Eco.Shared.dll
Syntax
public class AITarget : Object
Constructors
AITarget()
Declaration
Properties
ArrivalTime
Declaration
public double ArrivalTime { get; }
Property Value
| Type |
Description |
| System.Double |
|
DesiredSpeed
Declaration
public float DesiredSpeed { get; }
Property Value
| Type |
Description |
| System.Single |
|
DesiredVelocity
Declaration
public Vector3 DesiredVelocity { get; }
Property Value
| Type |
Description |
| System.Numerics.Vector3 |
|
HasLookTarget
Declaration
public bool HasLookTarget { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
NextTick
Declaration
public double NextTick { get; }
Property Value
| Type |
Description |
| System.Double |
|
OverridePos
Declaration
public Nullable<Vector3> OverridePos { get; }
Property Value
| Type |
Description |
| System.Nullable<System.Numerics.Vector3> |
|
PathingRotationSpeed
Declaration
public float PathingRotationSpeed { get; }
Property Value
| Type |
Description |
| System.Single |
|
Route
Declaration
public IEnumerable<Vector3> Route { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.Numerics.Vector3> |
|
RouteAndDesc
Declaration
public IEnumerable<(Vector3, string)> RouteAndDesc { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.ValueTuple<System.Numerics.Vector3, System.String>> |
|
RouteFollower
Declaration
public RouteFollower RouteFollower { get; }
Property Value
RunningSpeed
Declaration
public float RunningSpeed { get; }
Property Value
| Type |
Description |
| System.Single |
|
TargetObjID
Declaration
public int TargetObjID { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
TargetPosition
Returns either the target object position (if available) and updates Eco.Shared.Pathing.AITarget.targetPos to last known position or returns Eco.Shared.Pathing.AITarget.targetPos with fallback to default value otherwise.
Declaration
public Nullable<Vector3> TargetPosition { get; }
Property Value
| Type |
Description |
| System.Nullable<System.Numerics.Vector3> |
|
TraversalData
Declaration
public TraversalData TraversalData { get; }
Property Value
Methods
Clear()
Stop moving along any routes, and clear targets.
Declaration
Describe()
Declaration
Returns
| Type |
Description |
| System.String |
|
DesiredDirection(Single)
Declaration
public Vector3 DesiredDirection(float lookAhead = 0F)
Parameters
| Type |
Name |
Description |
| System.Single |
lookAhead |
|
Returns
| Type |
Description |
| System.Numerics.Vector3 |
|
FromBSON(BSONObject, INetObjectViewer)
Declaration
public void FromBSON(BSONObject obj, INetObjectViewer viewer)
Parameters
Position(Single)
Declaration
public Vector3 Position(float timeOffset = 0F)
Parameters
| Type |
Name |
Description |
| System.Single |
timeOffset |
|
Returns
| Type |
Description |
| System.Numerics.Vector3 |
|
SetFacing(Vector3)
Declaration
public void SetFacing(Vector3 dir)
Parameters
| Type |
Name |
Description |
| System.Numerics.Vector3 |
dir |
|
SetLook(Vector3i)
Declaration
public void SetLook(Vector3i pos)
Parameters
SetLook(INetObjectPosition)
Sets look to followingTarget. If followingTarget is null then resets look target.
Declaration
public void SetLook(INetObjectPosition followingTarget)
Parameters
SetPosition(Vector3)
Clear the route and set the position as passed.
Declaration
public void SetPosition(Vector3 pos)
Parameters
| Type |
Name |
Description |
| System.Numerics.Vector3 |
pos |
|
SetRoute(Route, INetObjectPosition, Single)
Sets route this agent will follow.
Declaration
public void SetRoute(Route route, INetObjectPosition targetOrganism = null, float delay = 0F)
Parameters
| Type |
Name |
Description |
| Route |
route |
|
| INetObjectPosition |
targetOrganism |
Object this agent should be looking at when following the route.
|
| System.Single |
delay |
Start of the route is delayed by this number of seconds by adding them to initial rotation time.
|
StartTime()
Declaration
public double StartTime()
Returns
| Type |
Description |
| System.Double |
|
ToBSON(INetObjectViewer)
Declaration
public BSONObject ToBSON(INetObjectViewer viewer)
Parameters
Returns
TravelTime()
Declaration
public float TravelTime()
Returns
| Type |
Description |
| System.Single |
|
TryGetTargetObject(out INetObjectPosition)
Declaration
public bool TryGetTargetObject(out INetObjectPosition targetObj)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Extension Methods