Documentation for C++/SDL 2.0 Tile Engine
Making a simple tile based engine
|
The player. More...
#include <player.h>
Inherits GameObject.
Public Member Functions | |
void | Update () |
Run once each fram. | |
void | Move (float deltaT) |
void | Draw (Camera *cam=nullptr) |
Json::Value | Save () |
void | Load (Json::Value val) |
![]() | |
virtual void | OnMouseDown () |
On mouse down events. | |
virtual void | OnMouseUp () |
On mouse up event. | |
virtual void | OnMouseEnter () |
On mouse enter. | |
virtual void | OnMouseExit () |
On mouse exit. | |
virtual void | CheckMouseOver (const Vector2f &pos) |
bool | GetMouseOver () |
Return T/F is the mouse is over the object. | |
bool | HasTag (std::string tag) |
void | SetCollisionMap (CollisionMap map) |
Rectf | Box () |
Get the object's box. |
Additional Inherited Members | |
![]() | |
Image | mImage |
Physics | mPhysics |
Handle's the objects physics. | |
std::string | mTag |
To store tags to identify the object. |
The player.
The player class, for handling the player
|
virtual |
Draw the gameobject, apply an adjustment for the camera if one is desired
cam | The camera to adjust for |
Implements GameObject.
|
virtual |
Load the object from a Json::Value
val | The Json::Value to load from |
Reimplemented from GameObject.
|
virtual |
|
virtual |
Save the object data to a json value and return it
Reimplemented from GameObject.