#include <class.objectmanager.hh>
Public Member Functions | |
CObject (CSprite *pSprite) | |
virtual | ~CObject () |
bool | Frame (Uint8 *keystate, Uint32 iDeltaTime) |
Do everything that happens between frames. | |
virtual bool | Interact (CObject *pObj) |
Interaction trigger. | |
bool | Logic (Uint8 *keystate, Uint32 iDeltaTime) |
Updates object logic (the default animations/collisions etc). | |
bool | CollisionHor (int x, int y, int *iTileY) |
Collision detection. | |
bool | CollisionVer (int x, int y, int *iTileX) |
Collision detection. | |
bool | RemoveHP (int hp) |
Remove health points. | |
void | Remove () |
Remove the object from the object manager. | |
void | RemoveAndFree () |
Remove the object from the object manager and free it's memory. | |
virtual void | SetAnimStand () |
Set stand animation. | |
virtual void | SetAnimMove () |
Set move animation. | |
virtual void | SetAnimJump () |
Set jump animation. | |
virtual void | SetAnimFall () |
Set fall animation. | |
virtual bool | UpdateMovement (Uint8 *keystate, Uint32 iDeltaTime, int iCollisionStatus) |
Update object movement. | |
int | Weapon_GetAmmo () |
Get weapon's ammo amount. | |
bool | Weapon_AddAmmo (int amount) |
Add ammo to the weapon. | |
virtual CPlayer * | CastToPlayer () |
Cast to player class. | |
virtual CEnemy * | CastToEnemy () |
Cast to enemy class. | |
virtual CWeapon * | CastToWeapon () |
Cast to weapon class. | |
virtual CBullet * | CastToBullet () |
Cast to bullet class. | |
Public Attributes | |
bool | mbDead |
int | iLastCollisionStatus |
Status of the last collision. | |
CSprite * | mpSprite |
CVector2D | mvVel |
Velocity. | |
CWeapon * | mpWeapon |
Uint32 | miRemoveHP_Timeout |
int | miHP |
Health points. | |
bool | mbJumpLock |
Whether jumping is locked or not. | |
Private Member Functions | |
CObject () |
CObject::CObject | ( | ) | [private] |
CObject::CObject | ( | CSprite * | pSprite | ) |
CObject::~CObject | ( | ) | [virtual] |
bool CObject::Frame | ( | Uint8 * | keystate, | |
Uint32 | iDeltaTime | |||
) |
Do everything that happens between frames.
For example: things like logic, animations and collisions.
bool CObject::Interact | ( | CObject * | pObj | ) | [virtual] |
bool CObject::Logic | ( | Uint8 * | keystate, | |
Uint32 | iDeltaTime | |||
) |
Updates object logic (the default animations/collisions etc).
bool CObject::CollisionHor | ( | int | x, | |
int | y, | |||
int * | iTileY | |||
) |
Collision detection.
bool CObject::CollisionVer | ( | int | x, | |
int | y, | |||
int * | iTileX | |||
) |
Collision detection.
bool CObject::RemoveHP | ( | int | hp | ) |
Remove health points.
void CObject::Remove | ( | ) |
Remove the object from the object manager.
void CObject::RemoveAndFree | ( | ) |
Remove the object from the object manager and free it's memory.
void CObject::SetAnimStand | ( | ) | [virtual] |
void CObject::SetAnimMove | ( | ) | [virtual] |
void CObject::SetAnimJump | ( | ) | [virtual] |
void CObject::SetAnimFall | ( | ) | [virtual] |
bool CObject::UpdateMovement | ( | Uint8 * | keystate, | |
Uint32 | iDeltaTime, | |||
int | iCollisionStatus | |||
) | [virtual] |
int CObject::Weapon_GetAmmo | ( | ) |
Get weapon's ammo amount.
bool CObject::Weapon_AddAmmo | ( | int | amount | ) |
Add ammo to the weapon.
bool CObject::mbDead |
Status of the last collision.
Velocity.
Uint32 CObject::miRemoveHP_Timeout |
int CObject::miHP |
Health points.
bool CObject::mbJumpLock |
Whether jumping is locked or not.