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
[Browsable(false)]
public int ActiveWaypointIndex { get; set; }
Property Value
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
Rotation
The horizontal rotation of the view direction in degrees.
public float Rotation { get; set; }
Property Value
Waypoints
The Waypoints associated with this entity ordered by ActivationTime.
[Browsable(false)]
public List<Waypoint> Waypoints { get; }
Property Value
Methods
CollisionTest(Quadrangle)
Determines whether a certain area collides with this entity (based on its Collision<TCoordinates> component).
public bool CollisionTest(Quadrangle area)
Parameters
areaQuadrangleThe area to check for collision in world space.
Returns
- bool
trueif theareadoes collide with this entity,falseotherwise.
CollisionTest(Vector2)
Determines whether a certain point collides with this entity (based on its Collision<TCoordinates> component).
public bool CollisionTest(Vector2 point)
Parameters
pointVector2The point to check for collision in world space.
Returns
- bool
trueif thepointdoes collide with this entity,falseotherwise.
GetCurrentWaypointIndex(double)
Determines the currently active Waypoints entry.
public int GetCurrentWaypointIndex(double gameTime)
Parameters
Returns
Update(double)
Updates the position and other attributes of this entity.
public override void Update(double elapsedTime)
Parameters
elapsedTimedoubleHow much game time in seconds has elapsed since this method was last called.