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


Public Member Functions | |
| CDeadCrowObject (const Vector3 &, const Vector3 &) | |
| Constructor. | |
| void | Move () |
| Move depending on time and speed. | |
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 | |
| const int | m_nMaxBounces = 3 |
| Maximum number of bounces allowed. | |
| int | m_nBounceCount = 0 |
| Number of bounces experienced. | |
| bool | m_bStatic = false |
| Whether crow corpse is static. | |
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 dead crow object falls from the sky, bounces a few times, and then lies static for a while before vanishing.
| CDeadCrowObject::CDeadCrowObject | ( | const Vector3 & | pos, |
| const Vector3 & | vel ) |
Construct a dead crow at a slightly different velocity from the crow whose death created this dead crow.
| pos | Crow position at time of death. |
| vel | Crow velocity at time of death. |
|
virtual |
Dead crows fall under gravity add bounce a fixed number of times when they hit the ground.
Reimplemented from CObject.
