SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
Drawable.h
1#ifndef Drawable_H
2#define Drawable_H
3
5#include "DrawableManager.h"
6
9
18class Drawable
19{
20protected:
21 Drawable();
22 Drawable(const Drawable&) = delete;
23 Drawable& operator=(const Drawable&) = delete;
24 virtual ~Drawable();
25
30
35
36private:
37 friend class DrawableAttorney;
38
43
48
53
58
62 virtual void Draw() {};
63
67 virtual void Draw2D() {};
68
72 void SceneRegistration();
73
78};
79
80#endif
Defines the registration states for GameObjects.
RegistrationState
Enum class representing the registration states of GameObjects.
Definition RegistrationState.h:19
Command to deregister a drawable object from drawing.
Definition DrawDeregistrationCommand.h:17
Command to register a drawable object for drawing.
Definition DrawRegistrationCommand.h:17
void SubmitDrawDeregistration()
Submits the draw deregistration for the GameObject.
Definition Drawable.cpp:27
void SceneDeregistration()
Deregisters the GameObject from drawing in the scene.
Definition Drawable.cpp:41
void SubmitDrawRegistration()
Submits the draw registration for the GameObject.
Definition Drawable.cpp:20
DrawableManager::StorageListRef pMyDeleteRef
Reference to the storage list iterator for the GameObject.
Definition Drawable.h:57
void SceneRegistration()
Registers the GameObject for drawing in the scene.
Definition Drawable.cpp:34
virtual void Draw2D()
Virtual method to be implemented by derived classes for 2D draw functionality.
Definition Drawable.h:67
DrawDeregistrationCommand * ptrDrawDeregistrationCmd
Pointer to the draw deregistration command for the GameObject.
Definition Drawable.h:52
RegistrationState RegStateCurr
The current registration state of the GameObject.
Definition Drawable.h:42
virtual void Draw()
Virtual method to be implemented by derived classes for draw functionality.
Definition Drawable.h:62
DrawRegistrationCommand * ptrDrawRegistrationCmd
Pointer to the draw registration command for the GameObject.
Definition Drawable.h:47
StorageList::iterator StorageListRef
Type alias for the storage list iterator.
Definition DrawableManager.h:54