Otter
0.9.8.91
2d Game Development Framework based on SFML.Net
|
Counter in which the value can be moved in both an X and Y direction. Probably most useful for making menus that are grids which the player can move around in. More...
Inherits Otter.Component.
Public Member Functions | |
void | MoveLeft () |
Move the index left. More... | |
void | MoveRight () |
Move the index right. More... | |
void | MoveUp () |
Move the index up. More... | |
void | MoveDown () |
Move the index down. More... | |
GridCounter (int value, int width=1, int height=1, bool wrapX=false, bool wrapY=false) | |
Create a new GridCounter. More... | |
Public Member Functions inherited from Otter.Component | |
T | GetEntity< T > () |
Get the Entity as a specific Type. More... | |
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 | Update () |
Called during the Update 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... | |
T | 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... | |
Static Public Member Functions | |
static implicit | operator float (GridCounter counter) |
static implicit | operator int (GridCounter counter) |
Public Attributes | |
int | Width |
The width of the grid. More... | |
int | Height |
The height of the grid. More... | |
bool | WrapX |
Determines if the GridCounter should wrap horizontally. More... | |
bool | WrapY |
Determines if the GridCounter should wrap vertically. 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 | |
int | Index [get, set] |
The 1d value of the counter on the grid. More... | |
bool | Wrap [set] |
Set both WrapX and WrapY. More... | |
int | Count [get] |
The total number of grid spaces. More... | |
int | X [get, set] |
The X value of the counter. More... | |
int | Y [get, set] |
The Y value of the counter. More... | |
Properties inherited from Otter.Component | |
int | InstanceId [get, set] |
The Component's id for the Entity its attached to. More... | |
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< Graphic > | Graphics [get] |
The list of Graphics from the parent Entity. More... | |
List< Collider > | Colliders [get] |
The list of Colliders from the parent Entity. More... | |
Counter in which the value can be moved in both an X and Y direction. Probably most useful for making menus that are grids which the player can move around in.
Otter.GridCounter.GridCounter | ( | int | value, |
int | width = 1 , |
||
int | height = 1 , |
||
bool | wrapX = false , |
||
bool | wrapY = false |
||
) |
Create a new GridCounter.
value | The initial value of the GridCounter. |
width | The width of the grid. |
height | The height of the grid. |
wrapX | Determines if the counter should wrap horizontally. |
wrapY | Determines if the counter should wrap vertically. |
void Otter.GridCounter.MoveDown | ( | ) |
Move the index down.
void Otter.GridCounter.MoveLeft | ( | ) |
Move the index left.
void Otter.GridCounter.MoveRight | ( | ) |
Move the index right.
void Otter.GridCounter.MoveUp | ( | ) |
Move the index up.
int Otter.GridCounter.Height |
The height of the grid.
int Otter.GridCounter.Width |
The width of the grid.
bool Otter.GridCounter.WrapX |
Determines if the GridCounter should wrap horizontally.
bool Otter.GridCounter.WrapY |
Determines if the GridCounter should wrap vertically.
|
get |
The total number of grid spaces.
|
getset |
The 1d value of the counter on the grid.
|
set |
Set both WrapX and WrapY.
|
getset |
The X value of the counter.
|
getset |
The Y value of the counter.