Ned's Turkey Farm
A Simple 2.5D Side Scroller
Loading...
Searching...
No Matches
CDeadCrowObject Class Reference

Dead crow object. More...

#include <DeadCrowObject.h>

Inheritance diagram for CDeadCrowObject:
Collaboration diagram for CDeadCrowObject:

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 CRendererm_pRenderer = nullptr
 Pointer to the renderer.
 
static CObjectManagerm_pObjectManager = nullptr
 Pointer to the object manager.
 
static CPlaneObjectm_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.
 

Detailed Description

The dead crow object falls from the sky, bounces a few times, and then lies static for a while before vanishing.

Constructor & Destructor Documentation

◆ CDeadCrowObject()

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.

Parameters
posCrow position at time of death.
velCrow velocity at time of death.

Member Function Documentation

◆ Move()

void CDeadCrowObject::Move ( )
virtual

Dead crows fall under gravity add bounce a fixed number of times when they hit the ground.

Reimplemented from CObject.

Here is the call graph for this function: