![]() |
SAGE
A Simple Academic Game Engine
|
A basic game object. More...
#include <SageObject.h>


Public Member Functions | |
| void | MarkForDeletion () |
| Mark as ready for deletion. | |
| const bool | MarkedForDeletion () const |
| Is marked for deletion. | |
Private Attributes | |
| bool | m_bMarkedForDeletion = false |
| Is ready to delete from object list. | |
Additional Inherited Members | |
Static Protected Attributes inherited from Sage::CComponent | |
| static std::unique_ptr< CTimer > | m_pTimer = std::make_unique<CTimer>() |
| Pointer to a timer. | |
| static std::unique_ptr< CRandom > | m_pRandom = std::make_unique<CRandom>() |
| Pointer to a PRNG. | |
| static std::unique_ptr< CSound > | m_pSound = std::make_unique<CSound>() |
| Pointer to sound manager. | |
| static std::unique_ptr< CKeyboard > | m_pKeyboard |
| Pointer to a keyboard handler. | |
| static std::unique_ptr< CMouse > | m_pMouse = std::make_unique<CMouse>() |
| Pointer to a mouse handler. | |
| static std::unique_ptr< CController > | m_pController |
| Pointer to a controller. | |
CObject is a basic object containing the necessary functions and data for being a member of an object list, plus virtual function stubs for moving and drawing during animation. You should derive the object classes in your game from this class. It is designed for use with an object manager derived from CObjectManager. If you call MarkForDeletion when this object is dead, then CObjectManager will delete it from the object list at the end of the frame.
| const bool CObject::MarkedForDeletion | ( | ) | const |
Reader function for the member variable m_bMarkedForDeletion.
| void CObject::MarkForDeletion | ( | ) |
Mark as ready for deletion by setting m_bMarkedForDeletion to true.