Otter  0.9.8.91
2d Game Development Framework based on SFML.Net
 All Classes Namespaces Functions Variables Enumerations Properties
Otter.Entity Class Reference

Class used for a game object. The bread and butter of your game. Entities are added to Scenes which are controlled by the Game. More...

Inherited by Otter.Flash, and Otter.Particle.

Public Member Functions

 Entity (float x=0, float y=0, Graphic graphic=null, Collider collider=null, string name="")
 Create an entity. More...
 
void SetGraphic (Graphic g)
 Sets the graphic to a new graphic, removing all previous graphics. More...
 
void SetPosition (float xy)
 Set the X and Y position to a value. More...
 
void AddPosition (float x, float y)
 Add to the X and Y positions of the Entity. More...
 
void AddPosition (Axis axis, float multiplier=1)
 Add to the X and Y position of the Entity. More...
 
void AddPosition (Vector2 vector)
 Add to the X and Y position of the Entity. More...
 
void SetPosition (float x, float y)
 Set the position of the Entity. More...
 
void SetPosition (Entity e, float offsetX=0, float offsetY=0)
 Set the position of the Entity to another Entity's position. More...
 
void SetPosition (Vector2 v)
 Set the position of the Entity. More...
 
AddGraphic< T > (T g)
 Adds a Graphic to the Entity. More...
 
AddGraphic< T > (T g, float x, float y)
 Adds a Graphic to the Entity. More...
 
List< GraphicAddGraphics (params Graphic[] graphics)
 Adds the graphics to the Entity. More...
 
AddGraphicGUI< T > (T g)
 Adds a graphic to the Entity and sets its Scroll value to 0. More...
 
AddGraphicGUI< T > (T g, float x, float y)
 Adds a graphic to the Entity and sets its Scroll value to 0. More...
 
List< GraphicAddGraphicsGUI (params Graphic[] graphics)
 Adds Graphics to the Entity and sets their Scroll values to 0. More...
 
RemoveGraphic< T > (T g)
 Removes a Graphic from the Entity. More...
 
void RemoveGraphics (params Graphic[] g)
 Removes Graphics from the Entity. More...
 
void ClearGraphics ()
 Remove all the graphics from the entity. More...
 
AddComponent< T > (T c)
 Adds a component to the entity. More...
 
AddComponent< T > (params object[] constructorArgs)
 Creates and adds a Component to the entity. More...
 
List< ComponentAddComponents (params Component[] c)
 Add multiple components to the entity. More...
 
RemoveComponent< T > (T c)
 Removes a component from the Entity. More...
 
RemoveComponent< T > ()
 Removes the first component of type T from the Entity. More...
 
void ClearComponents ()
 Remove all components from the Entity. More...
 
void AddSurface (Surface target)
 Add a surface that the entity should render to. More...
 
void RemoveSurface (Surface target)
 Remove a surface from the list of surfaces that the entity should render to. More...
 
void ClearSurfaces ()
 Remove all Surfaces from the list of Surfaces that the Entity should render to. More...
 
BoxCollider SetHitbox (int width, int height, params int[] tags)
 Shortcut to set the Collider of the entity to a BoxCollider. Using this will set the "Hitbox" field to this Collider. More...
 
BoxCollider SetHitbox (int width, int height, Enum tag, params Enum[] tags)
 Shortcut to set the Collider of the entity to a BoxCollider. Using this will set the "Hitbox" field to this Collider. More...
 
GetEntity< T > ()
 Get the first instance of an Entity of type T in this Entity's Scene. More...
 
List< T > GetEntities< T > ()
 Get a list of entities of type T from this Entity's Scene. More...
 
GetComponent< T > ()
 Get the first Component of type T. More...
 
Component GetComponent (Type type)
 Get the first Component of Type type. More...
 
List< T > GetComponents< T > ()
 Get all Components of type T. More...
 
GetGraphic< T > ()
 Get the first graphic of type T. More...
 
GetCollider< T > ()
 Get the first collider of type T. More...
 
AddCollider< T > (T c)
 Add a collider to the entity. More...
 
RemoveCollider< T > (T c)
 Remove the collider from the entity. More...
 
void ClearColliders ()
 Remove all colliders from the entity. More...
 
SetCollider< T > (T c)
 Remove all current colliders and set collider to a new one. More...
 
List< ColliderAddColliders (params Collider[] colliders)
 Adds colliders to the entity. More...
 
void RemoveColliders (params Collider[] colliders)
 Removes colliders from the entity. More...
 
Collider Collide (float x, float y, params int[] tags)
 Checks for a collision using the first available Collider. More...
 
Collider Collide (float x, float y, params Enum[] tags)
 Checks for a collision using the first available Collider. More...
 
List< ColliderCollideList (float x, float y, params int[] tags)
 Checks for a collision with the first available Collider. More...
 
List< ColliderCollideList (float x, float y, params Enum[] tags)
 Checks for a collision with the first available Collider. More...
 
List< EntityCollideEntities (float x, float y, params int[] tags)
 Checks for a collision with the first available Collider. More...
 
List< EntityCollideEntities (float x, float y, params Enum[] tags)
 Checks for a collision with the first available Collider. More...
 
List< T > CollideEntities< T > (float x, float y, List< T > entities)
 
List< T > CollideEntities< T > (float x, float y, params int[] tags)
 
List< T > CollideEntities< T > (float x, float y, params Enum[] tags)
 
bool Overlap (float x, float y, params int[] tags)
 Checks for an overlap using the first available collider. More...
 
bool Overlap (float x, float y, params Enum[] tags)
 Checks for an overlap using the first available collider. More...
 
bool Overlap (float x, float y, Entity e)
 Checks for an overlap using the first available collider. More...
 
virtual void Added ()
 Called when the entity is added to a scene. The reference to the Scene is available here. More...
 
virtual void Removed ()
 Called when the entity is removed from a scene. The reference to Scene is now null. More...
 
virtual void SceneBegin ()
 Called when the Scene begins. More...
 
virtual void SceneEnd ()
 Called when the Scene ends. More...
 
virtual void ScenePause ()
 Called when the Scene is paused. More...
 
virtual void SceneResume ()
 Called when the Scene is resumed. More...
 
virtual void Paused ()
 Called when the entity is paused by the Scene. More...
 
virtual void Resumed ()
 Called when the entity is resumed by the Scene. More...
 
Tween Tween (object target, object values, float duration, float delay=0)
 Tweens a set of numeric properties on an object. More...
 
virtual void UpdateFirst ()
 Called first during the update. Happens before Update. More...
 
virtual void UpdateLast ()
 Called last during the update. Happens after Update. More...
 
virtual void Update ()
 Called during the update of the game. More...
 
virtual void Render ()
 Called when the entity is rendering to the screen. More...
 
virtual void Prerender ()
 Called before an entity is rendered. Things rendered here will appear below the Entity's Graphics. More...
 
void RemoveSelf ()
 Remove this entity from the Scene it's in. More...
 

Public Attributes

float X
 The X position of the Entity. More...
 
float Y
 The Y position of the Entity. More...
 
float Timer
 How long the Entity has been active. More...
 
bool Visible = true
 Determines if the Entity will render. More...
 
bool Collidable = true
 Determines if the Entity will collide with other entities. The entity can still check for collisions, but will not register as a collision with other entities. More...
 
bool AutoUpdate = true
 Deteremines if the Entity's update functions will run automatically from the Scene. More...
 
bool AutoRender = true
 Determines if the Entity's render functions will run automatically from the Scene. More...
 
Tweener Tweener = new Tweener()
 The tween manager that controls all tweens on this entity. More...
 
Action OnAdded = delegate { }
 An action that fires when the entity is added to a Scene. More...
 
Action OnUpdate = delegate { }
 An action that fires when the entity is updated. More...
 
Action OnUpdateFirst = delegate { }
 An action that fires in the entity's UpdateFirst(). More...
 
Action OnUpdateLast = delegate { }
 An action that is fired in the entity's UpdateLast(). More...
 
Action OnRemoved = delegate { }
 An action that fires when the entity is removed from a Scene. More...
 
Action OnRender = delegate { }
 An action that fires when the entity is rendered. More...
 
string Name
 The name of this entity. Default's to the Type name. More...
 
int Layer
 The order in which to render this entity. Higher numbers draw later. More...
 
int Order
 The order in which to update this entity. Higher numbers update later. More...
 
int Group
 The pause group this entity is a part of. More...
 
float LifeSpan
 How long the entity should live in the scene before removing itself. If this is set the entity will be automatically removed when the Timer exceeds this value. More...
 

Properties

bool UpdatedOnce [get, set]
 Is true if the Entity has been updated by the Scene at least once. More...
 
Component this[int id] [get]
 
List< GraphicGraphics [get, set]
 The list of graphics to render. More...
 
List< ComponentComponents [get, set]
 The list of components to update and render. More...
 
List< ColliderColliders [get, set]
 The list of colliders to use for collision checks. More...
 
List< SurfaceSurfaces [get, set]
 The list of surfaces the entity should draw to. More...
 
Scene Scene [get, set]
 The Scene that controls and updates this entity. More...
 
int InstanceId [get, set]
 The int id of the Entity for the Scene its currently in. More...
 
bool IsInScene [get]
 Returns true if the entity is currently in a Scene, or is queued to be added to a Scene next update. More...
 
Surface Surface [get, set]
 The default Surface that the entity should render to. More...
 
Entity Overlapped [get, set]
 The currently overlapped entity. This only works when using an Overlap collision check, and there is a result. More...
 
BoxCollider Hitbox [get, set]
 Set to a collider by using the SetHitbox method. Shortcut reference. More...
 
Collider Collider [get, set]
 Returns the first available collider, or set the Collider. More...
 
Input Input [get]
 A reference to the Input object in the Game that controls the Scene. More...
 
Game Game [get]
 A reference to the Game that controls the Scene. More...
 
bool IsPaused [get]
 If the entity is currently paused by the scene. More...
 
float ScreenX [get]
 The x position in screen space of the entity. More...
 
float ScreenY [get]
 The y position in screen space of the entity. More...
 
Graphic Graphic [get, set]
 Returns the first available graphic, or set the graphic. More...
 
Vector2 Position [get, set]
 The position of the Entity represented as a Vector2 More...
 

Detailed Description

Class used for a game object. The bread and butter of your game. Entities are added to Scenes which are controlled by the Game.

Constructor & Destructor Documentation

Otter.Entity.Entity ( float  x = 0,
float  y = 0,
Graphic  graphic = null,
Collider  collider = null,
string  name = "" 
)

Create an entity.

Parameters
xThe x position to place the entity.
yThe y position to place the entity.
graphicThe graphic to assign to the entity. Defaults to null.
colliderThe collider to assign to the entity. Defaults to null.
nameThe name of the entity. Defaults to the type name.

Member Function Documentation

T Otter.Entity.AddCollider< T > ( c)

Add a collider to the entity.

Parameters
c
Type Constraints
T :Collider 
List<Collider> Otter.Entity.AddColliders ( params Collider[]  colliders)

Adds colliders to the entity.

Parameters
colliders
T Otter.Entity.AddComponent< T > ( c)

Adds a component to the entity.

Parameters
c
Type Constraints
T :Component 
T Otter.Entity.AddComponent< T > ( params object[]  constructorArgs)

Creates and adds a Component to the entity.

Template Parameters
TThe type of Component to create.
Parameters
constructorArgsThe arguments for the Component's constructor.
Returns
The newly created Component.
Type Constraints
T :Component 
List<Component> Otter.Entity.AddComponents ( params Component[]  c)

Add multiple components to the entity.

Parameters
cThe components to add.
Returns
A list of the added components.
virtual void Otter.Entity.Added ( )
virtual

Called when the entity is added to a scene. The reference to the Scene is available here.

Reimplemented in Otter.Particle, and Otter.Flash.

T Otter.Entity.AddGraphic< T > ( g)

Adds a Graphic to the Entity.

Parameters
gThe Graphic to add.
Returns
The added Graphic.
Type Constraints
T :Graphic 
T Otter.Entity.AddGraphic< T > ( g,
float  x,
float  y 
)

Adds a Graphic to the Entity.

Template Parameters
T
Parameters
gThe Graphic to add.
xThe X position to place the Graphic relative to the Entity.
yThe Y position to place the Graphic relative to the Entity.
Returns
The added Graphic.
Type Constraints
T :Graphic 
T Otter.Entity.AddGraphicGUI< T > ( g)

Adds a graphic to the Entity and sets its Scroll value to 0.

Template Parameters
T
Parameters
gThe Graphic to add.
Returns
The added Graphic.
Type Constraints
T :Graphic 
T Otter.Entity.AddGraphicGUI< T > ( g,
float  x,
float  y 
)

Adds a graphic to the Entity and sets its Scroll value to 0.

Template Parameters
T
Parameters
gThe Graphic to add.
xThe X position to place the Graphic relative to the Entity.
yThe Y position to place the Graphic relative to the Entity.
Returns
The added Graphic.
Type Constraints
T :Graphic 
List<Graphic> Otter.Entity.AddGraphics ( params Graphic[]  graphics)

Adds the graphics to the Entity.

Parameters
graphicsThe Graphics to add.
List<Graphic> Otter.Entity.AddGraphicsGUI ( params Graphic[]  graphics)

Adds Graphics to the Entity and sets their Scroll values to 0.

Template Parameters
T
Parameters
graphicsThe Graphics to add.
Returns
The added Graphics.
void Otter.Entity.AddPosition ( float  x,
float  y 
)

Add to the X and Y positions of the Entity.

Parameters
xThe amount to add to the x position.
yThe amount to add to the y position.
void Otter.Entity.AddPosition ( Axis  axis,
float  multiplier = 1 
)

Add to the X and Y position of the Entity.

Parameters
axisThe axis to add from.
multiplierThe amount to muliply the axis values by before adding.
void Otter.Entity.AddPosition ( Vector2  vector)

Add to the X and Y position of the Entity.

Parameters
vectorThe Vector2 to add to the position.
void Otter.Entity.AddSurface ( Surface  target)

Add a surface that the entity should render to.

Parameters
target
void Otter.Entity.ClearColliders ( )

Remove all colliders from the entity.

void Otter.Entity.ClearComponents ( )

Remove all components from the Entity.

void Otter.Entity.ClearGraphics ( )

Remove all the graphics from the entity.

void Otter.Entity.ClearSurfaces ( )

Remove all Surfaces from the list of Surfaces that the Entity should render to.

Collider Otter.Entity.Collide ( float  x,
float  y,
params int[]  tags 
)

Checks for a collision using the first available Collider.

Parameters
xThe X position to check for a collision at.
yThe Y position to check for a collision at.
tagsThe int tags to check for.
Returns
Collider Otter.Entity.Collide ( float  x,
float  y,
params Enum[]  tags 
)

Checks for a collision using the first available Collider.

Parameters
xThe X position to check for a collision at.
yThe Y position to check for a collision at.
tagsThe enum tags to check for.
Returns
List<Entity> Otter.Entity.CollideEntities ( float  x,
float  y,
params int[]  tags 
)

Checks for a collision with the first available Collider.

Parameters
xThe X position to check for a collision at.
yThe Y position to check for a collision at.
tagsThe int tags to check for.
Returns
A list of all entities touched.
List<Entity> Otter.Entity.CollideEntities ( float  x,
float  y,
params Enum[]  tags 
)

Checks for a collision with the first available Collider.

Parameters
xThe X position to check for a collision at.
yThe Y position to check for a collision at.
tagsThe enum tags to check for.
Returns
A list of all Entities touched.
List<Collider> Otter.Entity.CollideList ( float  x,
float  y,
params int[]  tags 
)

Checks for a collision with the first available Collider.

Parameters
xThe X position to check for a collision at.
yThe Y position to check for a collision at.
tagsThe int tags to check for.
Returns
A list of all colliders touched.
List<Collider> Otter.Entity.CollideList ( float  x,
float  y,
params Enum[]  tags 
)

Checks for a collision with the first available Collider.

Parameters
xThe X position to check for a collision at.
yThe Y position to check for a collision at.
tagsThe enum tags to check for.
Returns
A list of all colliders touched.
T Otter.Entity.GetCollider< T > ( )

Get the first collider of type T.

Template Parameters
TThe type of collider to look for.
Returns
The collider.
Type Constraints
T :Collider 
Component Otter.Entity.GetComponent ( Type  type)

Get the first Component of Type type.

Parameters
typeThe Type of Component to look for.
Returns
The first Component of that Type.

Get the first Component of type T.

Template Parameters
TThe type of Component to look for.
Returns
The Component.
Type Constraints
T :Component 
List<T> Otter.Entity.GetComponents< T > ( )

Get all Components of type T.

Template Parameters
TThe type of Component to look for.
Returns
A list of Components of type T.
Type Constraints
T :Component 
List<T> Otter.Entity.GetEntities< T > ( )

Get a list of entities of type T from this Entity's Scene.

Template Parameters
TThe type of entity to collect.
Returns
A list of entities of type T.
Type Constraints
T :Entity 
T Otter.Entity.GetEntity< T > ( )

Get the first instance of an Entity of type T in this Entity's Scene.

Template Parameters
TThe entity type to search for.
Returns
The first entity of that type in the scene.
Type Constraints
T :Entity 
T Otter.Entity.GetGraphic< T > ( )

Get the first graphic of type T.

Template Parameters
TThe type of graphic to look for.
Returns
The graphic.
Type Constraints
T :Graphic 
bool Otter.Entity.Overlap ( float  x,
float  y,
params int[]  tags 
)

Checks for an overlap using the first available collider.

Parameters
xThe X position to check for a collision at.
yThe Y position to check for a collision at.
tagsThe int tags to check for.
Returns
True if there is a collision.
bool Otter.Entity.Overlap ( float  x,
float  y,
params Enum[]  tags 
)

Checks for an overlap using the first available collider.

Parameters
xThe X position to check for a collision at.
yThe Y position to check for a collision at.
tagsThe enum tags to check for.
Returns
True if there is a collision.
bool Otter.Entity.Overlap ( float  x,
float  y,
Entity  e 
)

Checks for an overlap using the first available collider.

Parameters
xThe X position to check for a collision at.
yThe Y position to check for a collision at.
eThe Entity to check for a collision with.
Returns
True if there is a collision.
virtual void Otter.Entity.Paused ( )
virtual

Called when the entity is paused by the Scene.

virtual void Otter.Entity.Prerender ( )
virtual

Called before an entity is rendered. Things rendered here will appear below the Entity's Graphics.

T Otter.Entity.RemoveCollider< T > ( c)

Remove the collider from the entity.

Parameters
c
Type Constraints
T :Collider 
void Otter.Entity.RemoveColliders ( params Collider[]  colliders)

Removes colliders from the entity.

Parameters
colliders
T Otter.Entity.RemoveComponent< T > ( c)

Removes a component from the Entity.

Parameters
c
Type Constraints
T :Component 
T Otter.Entity.RemoveComponent< T > ( )

Removes the first component of type T from the Entity.

Template Parameters
TThe type of component to remove.
Returns
The removed component.
Type Constraints
T :Component 
virtual void Otter.Entity.Removed ( )
virtual

Called when the entity is removed from a scene. The reference to Scene is now null.

Reimplemented in Otter.Particle, and Otter.Flash.

T Otter.Entity.RemoveGraphic< T > ( g)

Removes a Graphic from the Entity.

Parameters
gThe Graphic to remove.
Type Constraints
T :Graphic 
void Otter.Entity.RemoveGraphics ( params Graphic[]  g)

Removes Graphics from the Entity.

Parameters
gThe Graphics to remove.
void Otter.Entity.RemoveSelf ( )

Remove this entity from the Scene it's in.

void Otter.Entity.RemoveSurface ( Surface  target)

Remove a surface from the list of surfaces that the entity should render to.

Parameters
target
virtual void Otter.Entity.Render ( )
virtual

Called when the entity is rendering to the screen.

virtual void Otter.Entity.Resumed ( )
virtual

Called when the entity is resumed by the Scene.

virtual void Otter.Entity.SceneBegin ( )
virtual

Called when the Scene begins.

virtual void Otter.Entity.SceneEnd ( )
virtual

Called when the Scene ends.

Reimplemented in Otter.Particle.

virtual void Otter.Entity.ScenePause ( )
virtual

Called when the Scene is paused.

virtual void Otter.Entity.SceneResume ( )
virtual

Called when the Scene is resumed.

T Otter.Entity.SetCollider< T > ( c)

Remove all current colliders and set collider to a new one.

Parameters
c
Type Constraints
T :Collider 
void Otter.Entity.SetGraphic ( Graphic  g)

Sets the graphic to a new graphic, removing all previous graphics.

Parameters
g
BoxCollider Otter.Entity.SetHitbox ( int  width,
int  height,
params int[]  tags 
)

Shortcut to set the Collider of the entity to a BoxCollider. Using this will set the "Hitbox" field to this Collider.

Parameters
widthThe width of the box collider.
heightThe height of the box collider.
tagsThe tags assigned to the box collider.
Returns
The created box collider.
BoxCollider Otter.Entity.SetHitbox ( int  width,
int  height,
Enum  tag,
params Enum[]  tags 
)

Shortcut to set the Collider of the entity to a BoxCollider. Using this will set the "Hitbox" field to this Collider.

Parameters
widthThe width of the box collider.
heightThe height of the box collider.
tagThe first tag to add.
tagsThe rest of the tags to add.
Returns
void Otter.Entity.SetPosition ( float  xy)

Set the X and Y position to a value.

Parameters
xyThe value of the X and Y position.
void Otter.Entity.SetPosition ( float  x,
float  y 
)

Set the position of the Entity.

Parameters
xThe new x position.
yThe new y position.
void Otter.Entity.SetPosition ( Entity  e,
float  offsetX = 0,
float  offsetY = 0 
)

Set the position of the Entity to another Entity's position.

Parameters
eThe Entity to match positions with.
void Otter.Entity.SetPosition ( Vector2  v)

Set the position of the Entity.

Parameters
vThe vector of the new position.
Tween Otter.Entity.Tween ( object  target,
object  values,
float  duration,
float  delay = 0 
)

Tweens a set of numeric properties on an object.

Parameters
targetThe object to tween.
valuesThe values to tween to, in an anonymous type ( new { prop1 = 100, prop2 = 0} ).
durationDuration of the tween in seconds.
delayDelay before the tween starts, in seconds.
Returns
The tween created, for setting properties on.
virtual void Otter.Entity.Update ( )
virtual

Called during the update of the game.

Reimplemented in Otter.Particle, and Otter.Flash.

virtual void Otter.Entity.UpdateFirst ( )
virtual

Called first during the update. Happens before Update.

virtual void Otter.Entity.UpdateLast ( )
virtual

Called last during the update. Happens after Update.

Member Data Documentation

bool Otter.Entity.AutoRender = true

Determines if the Entity's render functions will run automatically from the Scene.

bool Otter.Entity.AutoUpdate = true

Deteremines if the Entity's update functions will run automatically from the Scene.

bool Otter.Entity.Collidable = true

Determines if the Entity will collide with other entities. The entity can still check for collisions, but will not register as a collision with other entities.

int Otter.Entity.Group

The pause group this entity is a part of.

int Otter.Entity.Layer

The order in which to render this entity. Higher numbers draw later.

float Otter.Entity.LifeSpan

How long the entity should live in the scene before removing itself. If this is set the entity will be automatically removed when the Timer exceeds this value.

string Otter.Entity.Name

The name of this entity. Default's to the Type name.

Action Otter.Entity.OnAdded = delegate { }

An action that fires when the entity is added to a Scene.

Action Otter.Entity.OnRemoved = delegate { }

An action that fires when the entity is removed from a Scene.

Action Otter.Entity.OnRender = delegate { }

An action that fires when the entity is rendered.

Action Otter.Entity.OnUpdate = delegate { }

An action that fires when the entity is updated.

Action Otter.Entity.OnUpdateFirst = delegate { }

An action that fires in the entity's UpdateFirst().

Action Otter.Entity.OnUpdateLast = delegate { }

An action that is fired in the entity's UpdateLast().

int Otter.Entity.Order

The order in which to update this entity. Higher numbers update later.

float Otter.Entity.Timer

How long the Entity has been active.

Tweener Otter.Entity.Tweener = new Tweener()

The tween manager that controls all tweens on this entity.

bool Otter.Entity.Visible = true

Determines if the Entity will render.

float Otter.Entity.X

The X position of the Entity.

float Otter.Entity.Y

The Y position of the Entity.

Property Documentation

Collider Otter.Entity.Collider
getset

Returns the first available collider, or set the Collider.

List<Collider> Otter.Entity.Colliders
getset

The list of colliders to use for collision checks.

List<Component> Otter.Entity.Components
getset

The list of components to update and render.

Game Otter.Entity.Game
get

A reference to the Game that controls the Scene.

Graphic Otter.Entity.Graphic
getset

Returns the first available graphic, or set the graphic.

List<Graphic> Otter.Entity.Graphics
getset

The list of graphics to render.

BoxCollider Otter.Entity.Hitbox
getset

Set to a collider by using the SetHitbox method. Shortcut reference.

Input Otter.Entity.Input
get

A reference to the Input object in the Game that controls the Scene.

int Otter.Entity.InstanceId
getset

The int id of the Entity for the Scene its currently in.

bool Otter.Entity.IsInScene
get

Returns true if the entity is currently in a Scene, or is queued to be added to a Scene next update.

bool Otter.Entity.IsPaused
get

If the entity is currently paused by the scene.

Entity Otter.Entity.Overlapped
getset

The currently overlapped entity. This only works when using an Overlap collision check, and there is a result.

Vector2 Otter.Entity.Position
getset

The position of the Entity represented as a Vector2

Scene Otter.Entity.Scene
getset

The Scene that controls and updates this entity.

float Otter.Entity.ScreenX
get

The x position in screen space of the entity.

float Otter.Entity.ScreenY
get

The y position in screen space of the entity.

Surface Otter.Entity.Surface
getset

The default Surface that the entity should render to.

List<Surface> Otter.Entity.Surfaces
getset

The list of surfaces the entity should draw to.

bool Otter.Entity.UpdatedOnce
getset

Is true if the Entity has been updated by the Scene at least once.


The documentation for this class was generated from the following file: