Slippers Engine
 
Loading...
Searching...
No Matches
GameObject Class Reference

Responsible for GameObject centralization. More...

#include <GameObject.h>

Inheritance diagram for GameObject:
Inheritance graph

Private Member Functions

void SubmitEntry ()
 Function to be called when GameObject enters a scene.
 
void SubmitExit ()
 Function to be called when GameObject exits a scene.
 
virtual void SceneEntry ()
 Function called by SubmitEntry() responsible for registration.
 
virtual void SceneExit ()
 Function called by SubmitExit() responsible for deregistration.
 

Additional Inherited Members

- Protected Member Functions inherited from Updatable
void SubmitRegistration ()
 Called when wanting to make changes every frame.
 
void SubmitDeregistration ()
 Called when wanting to stop making changes every frame.
 
- Protected Member Functions inherited from Drawable
void SubmitRegistration ()
 Called when wanting to show graphics objects on screen.
 
void SubmitDeregistration ()
 Called when wanting to hide graphics objects on screen.
 
- Protected Member Functions inherited from Drawable2D
void SubmitRegistration ()
 Called when wanting to show sprites on screen.
 
void SubmitDeregistration ()
 Called when wanting to hide sprites on screen.
 
- Protected Member Functions inherited from Alarmable
void SubmitRegistration (float t, AlarmableManager::ALARM_ID id)
 Called when wanting to start an alarm.
 
void SubmitDeregistration (AlarmableManager::ALARM_ID id)
 Called when wanting to cancel an alarm.
 
- Protected Member Functions inherited from Inputable
void SubmitRegistration (AZUL_KEY k, EVENT_TYPE e)
 Called when wanting to check for a specific key.
 
void SubmitDeregistration (AZUL_KEY k, EVENT_TYPE e)
 Called when wanting to stop checking for a specific key.
 
- Protected Member Functions inherited from Collidable
void SubmitRegistration ()
 Called when wanting to check for collisions.
 
void SubmitDeregistration ()
 Called when wanting to stop checking for collisions.
 
void SetColliderModel (Model *mod)
 Stores an Objects Collision Model for calculating collisions.
 
void UpdateCollisionData (const Matrix &mat)
 Updates Objects Collision Model for proper scaling and positioning.
 
template<typename C>
void SetCollidableGroup ()
 Registers a DemoObject to be part of a Collision Group.
 

Detailed Description

Responsible for GameObject centralization.

Member Function Documentation

◆ SceneEntry()

virtual void GameObject::SceneEntry ( )
privatevirtual

Function called by SubmitEntry() responsible for registration.

Use this function in a GameObject to manage what features get registered when this object enters a Scene.

Example:

void DemoObject::SceneEntry(){
}
@ KEY_PRESS
Definition KeyStateCommon.h:6
void SubmitRegistration(float t, AlarmableManager::ALARM_ID id)
Called when wanting to start an alarm.
Definition Alarmable.cpp:101
@ ALARM_0
Definition AlarmableManager.h:15
void SubmitRegistration()
Called when wanting to check for collisions.
Definition Collidable.cpp:41
void SubmitRegistration()
Called when wanting to show sprites on screen.
Definition Drawable2D.cpp:37
void SubmitRegistration()
Called when wanting to show graphics objects on screen.
Definition Drawable.cpp:37
void SubmitRegistration(AZUL_KEY k, EVENT_TYPE e)
Called when wanting to check for a specific key.
Definition Inputable.cpp:49
void SubmitRegistration()
Called when wanting to make changes every frame.
Definition Updatable.cpp:37

◆ SceneExit()

virtual void GameObject::SceneExit ( )
privatevirtual

Function called by SubmitExit() responsible for deregistration.

Use this function in a GameObject to manage what features get registered when this object exits a Scene.

Example:

void DemoObject::SceneEntry(){
}
void SubmitDeregistration(AlarmableManager::ALARM_ID id)
Called when wanting to cancel an alarm.
Definition Alarmable.cpp:111
void SubmitDeregistration()
Called when wanting to stop checking for collisions.
Definition Collidable.cpp:49
void SubmitDeregistration()
Called when wanting to hide sprites on screen.
Definition Drawable2D.cpp:45
void SubmitDeregistration()
Called when wanting to hide graphics objects on screen.
Definition Drawable.cpp:45
void SubmitDeregistration(AZUL_KEY k, EVENT_TYPE e)
Called when wanting to stop checking for a specific key.
Definition Inputable.cpp:86
void SubmitDeregistration()
Called when wanting to stop making changes every frame.
Definition Updatable.cpp:45

◆ SubmitEntry()

void GameObject::SubmitEntry ( )
private

Function to be called when GameObject enters a scene.

This function is to be called by other classes for when a GameObject enters a scene. Go to SceneEntry() to figure out more.

◆ SubmitExit()

void GameObject::SubmitExit ( )
private

Function to be called when GameObject exits a scene.

This function is to be called by other classes for when a GameObject exits a scene. Go to SceneExit() to figure out more.