![]() |
Ned's Turkey Farm
A Simple 2.5D Side Scroller
|
The house object. More...
#include <HouseObject.h>


Public Member Functions | |
| CHouseObject (const Vector3 &) | |
| Constructor. | |
| ~CHouseObject () | |
| Destructor. | |
| void | Move () |
| Move object. | |
Public Member Functions inherited from CObject | |
| CObject () | |
| Default constructor. | |
| CObject (eSprite, const Vector3 &) | |
| Constructor. | |
| virtual | ~CObject () |
| Destructor. | |
| void | Kill () |
| Kill the object. | |
| bool | TooOld () |
| Kill me. | |
| void | GetRenderList (std::vector< Sage::CSpriteDesc3D > &) |
| Get render list. | |
| const Vector3 & | GetPos () const |
| Get position. | |
| const Vector3 & | GetVel () const |
| Get velocity. | |
| const float | GetRoll () const |
| Get roll angle. | |
| const eSprite | GetType () const |
| Get sprite type. | |
| virtual void | SetVel (const Vector3 &) |
| Set velocity. | |
| virtual void | SetRoll (float) |
| Set roll angle. | |
| void | SetRotSpeed (float) |
| Set roll speed. | |
| void | SetLifeTime (float) |
| Set lifetime. | |
Public Member Functions inherited from CCommon | |
| float | Wrap (float) |
| Wrap horizontal distance. | |
Private Attributes | |
| Sage::CEventTimer * | m_pSmokeEvent = nullptr |
| Smoke puff event. | |
Additional Inherited Members | |
Protected Attributes inherited from CObject | |
| Sage::CSpriteDesc3D * | m_pSpriteDesc = nullptr |
| Pointer to sprite descriptor. | |
| Vector3 | m_vVel = Vector3::Zero |
| Velocity. | |
| float | m_fRollSpeed = 0.0f |
| Roll speed in revs per second. | |
| float | m_fFrameTimer = 0.0f |
| Last time the frame was changed. | |
| float | m_fFrameInterval = 0.1f |
| Interval between frames. | |
| float | m_fBirthTime = 0.0f |
| Time of creation. | |
| float | m_fLifeTime = FLT_MAX |
| Time that object lives. | |
| Sage::CParticleEngine3D * | m_pParticleEngine = nullptr |
| Pointer to a particle engine. | |
Static Protected Attributes inherited from CCommon | |
| static CRenderer * | m_pRenderer = nullptr |
| Pointer to the renderer. | |
| static CObjectManager * | m_pObjectManager = nullptr |
| Pointer to the object manager. | |
| static CPlaneObject * | m_pPlayer = nullptr |
| Pointer to player character. | |
| static float | m_fWorldScale = 2.0f |
| World scale. | |
| static Vector3 | m_vCellSize = Vector3::Zero |
| Cell size. | |
| static UINT | m_nNumCells = 3 |
| Number of cells. | |
| static float | m_fWorldWidth = 0.0f |
| World width. | |
| static eDrawMode | m_eDrawMode = eDrawMode::Playing |
| Draw mode. | |
| static eGameState | m_eGameState = eGameState::Loading |
| Game state. | |
The abstract representation of a house object. It just sits where it's put and emits a puff of smoke from its chimney at regular intervals.
| CHouseObject::CHouseObject | ( | const Vector3 & | p | ) |
Create a particle engine and an event timer for the chimney smoke.
| p | Initial position of house. |
| CHouseObject::~CHouseObject | ( | ) |
Delete the smoke event timer and particle engine.
|
virtual |
The house object doesn't actually move, but we use this function to animate its particle engine and emit smoke from the chimney.
Reimplemented from CObject.