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

Responsible for 2D Draw functions. More...

#include <Drawable2D.h>

Collaboration diagram for Drawable2D:
Collaboration graph

Protected Member Functions

void SubmitRegistration ()
 Called when wanting to show sprites on screen.
 
void SubmitDeregistration ()
 Called when wanting to hide sprites on screen.
 

Private Member Functions

virtual void Draw2D ()
 Fill this with code that occurs during the Draw2D phase.
 

Detailed Description

Responsible for 2D Draw functions.

Member Function Documentation

◆ Draw2D()

virtual void Drawable2D::Draw2D ( )
privatevirtual

Fill this with code that occurs during the Draw2D phase.

This function will be where you want to add render calls on your sprites. A GameObject can render multiple sprites in the Draw2D call.

Example:

void DemoObj::Draw2D() {
demoSpriteOne->Render();
demoSpriteTwo->Render();
}

◆ SubmitDeregistration()

void Drawable2D::SubmitDeregistration ( )
protected

Called when wanting to hide sprites on screen.

Example:

void SubmitDeregistration()
Called when wanting to hide sprites on screen.
Definition Drawable2D.cpp:45

◆ SubmitRegistration()

void Drawable2D::SubmitRegistration ( )
protected

Called when wanting to show sprites on screen.

Example:

void SubmitRegistration()
Called when wanting to show sprites on screen.
Definition Drawable2D.cpp:37