Table of Contents

Class Entity

Namespace
FrameOfReference.World.Positionables
Assembly
FrameOfReference.World.dll

An entity that can be placed on a Terrain<TTemplate>.

public sealed class Entity : EntityBase<Vector2, EntityTemplate>, ICloneable, IChangeNotify<Positionable<Vector2>>, IUpdateable, ITemplated
Inheritance
Positionable<Vector2>
Entity
Implements
Inherited Members
Extension Methods

Properties

ActiveWaypointIndex

The Waypoints index of the Waypoint this entity is currently moving towards; -1 for no Waypoint.

[Browsable(false)]
public int ActiveWaypointIndex { get; set; }

Property Value

int

IsPlayerControlled

true if this entity is controlled by a human player, false if it is controlled by the computer.

public bool IsPlayerControlled { get; set; }

Property Value

bool

Rotation

The horizontal rotation of the view direction in degrees.

public float Rotation { get; set; }

Property Value

float

Waypoints

The Waypoints associated with this entity ordered by ActivationTime.

[Browsable(false)]
public List<Waypoint> Waypoints { get; }

Property Value

List<Waypoint>

Methods

CollisionTest(Quadrangle)

Determines whether a certain area collides with this entity (based on its Collision<TCoordinates> component).

public bool CollisionTest(Quadrangle area)

Parameters

area Quadrangle

The area to check for collision in world space.

Returns

bool

true if the area does collide with this entity, false otherwise.

CollisionTest(Vector2)

Determines whether a certain point collides with this entity (based on its Collision<TCoordinates> component).

public bool CollisionTest(Vector2 point)

Parameters

point Vector2

The point to check for collision in world space.

Returns

bool

true if the point does collide with this entity, false otherwise.

GetCurrentWaypointIndex(double)

Determines the currently active Waypoints entry.

public int GetCurrentWaypointIndex(double gameTime)

Parameters

gameTime double

The current GameTime value.

Returns

int

The currently active Waypoint; null if none is active.

Update(double)

Updates the position and other attributes of this entity.

public override void Update(double elapsedTime)

Parameters

elapsedTime double

How much game time in seconds has elapsed since this method was last called.