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

Class representing one piece of a Snake. More...

Inherits Otter.Component.

Classes

struct  VertebraSlot
 A struct containing the final transformation of the Vertebra from the Snake. More...
 

Public Member Functions

void SetEntity (Entity e)
 Sets the Entity of the Vertebra (another way to add this component to an Entity.) More...
 
override void Update ()
 Called during the Update on the parent Entity. More...
 
- Public Member Functions inherited from Otter.Component
virtual void Added ()
 Called when the Component is added to the Entity. More...
 
virtual void Removed ()
 Called when the Component is removed from the Entity. More...
 
void RemoveSelf ()
 Removes the Component from its parent Entity. More...
 
virtual void UpdateFirst ()
 Called during the UpdateFirst on the parent Entity. More...
 
virtual void Render ()
 Called during the Render on the parent Entity. More...
 
virtual void UpdateLast ()
 Called during the UpdateLast on the parent Entity. More...
 
GetComponent< T > ()
 Gets the first Component of type T from this Component's Entity. More...
 
List< T > GetComponents< T > ()
 Gets a list of Components of type T from this Component's Entity. More...
 

Public Attributes

int Distance
 The distance from the previous Vertabra in the Snake. More...
 
VertebraSlot Slot
 The slot that contains the final transformation of the Vertebra. More...
 
Snake Snake
 The Snake that this Vertebra belongs to. More...
 
int TotalDistance
 The total distance from the head of the Snake for this Vertebra. More...
 
bool AutoAddEntities
 Determines if the Vertebra will automatically add its Entity to the Scene. More...
 
- Public Attributes inherited from Otter.Component
Entity Entity
 The parent Entity of the Component. More...
 
bool RenderAfterEntity = true
 Determines if the Component should render after the Entity has rendered. More...
 
bool Visible = true
 Determines if the Component will render. More...
 
float Timer = 0
 How long the Component has been alive (added to an Entity and updated.) More...
 

Properties

float LocalRotation [get, set]
 The local rotation of the Vertebra. More...
 
float Rotation [get, set]
 The rotation of the Vertebra. When setting this the LocalRotation will be set. More...
 
- Properties inherited from Otter.Component
Scene Scene [get]
 The Scene that the parent Entity is in. More...
 
Collider Collider [get]
 The first Collider of the parent Entity. More...
 
Graphic Graphic [get]
 The first Graphic of the parent Entity. More...
 
List< GraphicGraphics [get]
 The list of Graphics from the parent Entity. More...
 
List< ColliderColliders [get]
 The list of Colliders from the parent Entity. More...
 

Detailed Description

Class representing one piece of a Snake.

Member Function Documentation

void Otter.Vertebra.SetEntity ( Entity  e)

Sets the Entity of the Vertebra (another way to add this component to an Entity.)

Parameters
eThe Entity to assign to this Vertebra.
override void Otter.Vertebra.Update ( )
virtual

Called during the Update on the parent Entity.

Reimplemented from Otter.Component.

Member Data Documentation

bool Otter.Vertebra.AutoAddEntities

Determines if the Vertebra will automatically add its Entity to the Scene.

int Otter.Vertebra.Distance

The distance from the previous Vertabra in the Snake.

VertebraSlot Otter.Vertebra.Slot

The slot that contains the final transformation of the Vertebra.

Snake Otter.Vertebra.Snake

The Snake that this Vertebra belongs to.

int Otter.Vertebra.TotalDistance

The total distance from the head of the Snake for this Vertebra.

Property Documentation

float Otter.Vertebra.LocalRotation
getset

The local rotation of the Vertebra.

float Otter.Vertebra.Rotation
getset

The rotation of the Vertebra. When setting this the LocalRotation will be set.


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