SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
DrawableAttorney.h
1#ifndef DrawableAttorney_H
2#define DrawableAttorney_H
3
4#include "Drawable.h"
5
14{
15public:
21 {
22 private:
23 friend class DrawableManager;
24
29 static void Draw(Drawable* p) { p->Draw(); }
30
35 static void Draw2D(Drawable* p) { p->Draw2D(); }
36
43 };
44
50 {
51 private:
52 friend class DrawRegistrationCommand;
53 friend class DrawDeregistrationCommand;
54
59 static void SceneRegistration(Drawable* p) { p->SceneRegistration(); };
60
66 };
67};
68
69#endif
Provides access to the game loop related functions of Drawable.
Definition DrawableAttorney.h:21
static void Draw(Drawable *p)
Calls the Draw method of the Drawable object.
Definition DrawableAttorney.h:29
static DrawableManager::StorageListRef & GetRef(Drawable *p)
Retrieves the storage list reference of the Drawable object.
Definition DrawableAttorney.h:42
static void Draw2D(Drawable *p)
Calls the Draw2D method of the Drawable object.
Definition DrawableAttorney.h:35
Provides access to the registration related functions of Drawable.
Definition DrawableAttorney.h:50
static void SceneRegistration(Drawable *p)
Registers the Drawable object for drawing in the scene.
Definition DrawableAttorney.h:59
static void SceneDeregistration(Drawable *p)
Deregisters the Drawable object from drawing in the scene.
Definition DrawableAttorney.h:65
Provides controlled access to the Drawable class for specific classes.
Definition DrawableAttorney.h:14
Base class for objects that can be drawn in the game loop.
Definition Drawable.h:19
void SceneDeregistration()
Deregisters the GameObject from drawing in the scene.
Definition Drawable.cpp:41
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
virtual void Draw()
Virtual method to be implemented by derived classes for draw functionality.
Definition Drawable.h:62
StorageList::iterator StorageListRef
Type alias for the storage list iterator.
Definition DrawableManager.h:54