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
area
QuadrangleThe area to check for collision in world space.
Returns
- bool
true
if thearea
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
Vector2The point to check for collision in world space.
Returns
- bool
true
if thepoint
does collide with this entity,false
otherwise.
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
elapsedTime
doubleHow much game time in seconds has elapsed since this method was last called.