5#include "../GameObject/Alarmable/AlarmableManager.h"
6#include "../GameObject/Collidable/CollisionManager.h"
35 Scene(
const Scene&) =
delete;
36 Scene& operator=(
const Scene&) =
delete;
76 friend class SceneAttorney;
226 template <
typename C>
237 template <
typename C1,
typename C2>
247 template <
typename Type>
256 DebugMsg::out(
"Error: No terrain set for the scene. Call SetTerrain() before setting collision.\n");
Defines the event types for input handling.
EventType
Enum class representing the types of input events.
Definition EventType.h:19
Base class for objects that can have alarms triggered in the game loop.
Definition Alarmable.h:19
Manages the registration and processing of alarms for GameObjects.
Definition AlarmableManager.h:16
ALARM_ID
Enum class representing the alarm IDs.
Definition AlarmableManager.h:22
Manages the current and default cameras for both 3D and 2D views.
Definition CameraManager.h:14
Base class for objects that can participate in collision detection.
Definition Collidable.h:26
Manages the registration and processing of collisions for GameObjects.
Definition CollisionManager.h:24
Base class for all command objects.
Definition CommandBase.h:19
Base class for objects that can be drawn in the game loop.
Definition Drawable.h:19
Manages the registration and processing of drawable GameObjects.
Definition DrawableManager.h:16
Manages the registration and processing of keyboard events for GameObjects.
Definition KeyboardEventManager.h:19
virtual void SceneEnd()=0
Ends the scene. Defined by the user.
CollisionManager * GetCollisionManager()
Gets the collision manager for the scene.
Definition Scene.cpp:133
void SubmitCommand(CommandBase *cmd)
Submits a command to the scene.
Definition Scene.cpp:128
Camera * GetCurrentCamera() const
Gets the current camera for the scene.
Definition Scene.cpp:42
UpdatableManager * updatableManager
Pointer to the updatable manager.
Definition Scene.h:91
void Register(Updatable *up)
Registers an updatable GameObject.
Definition Scene.cpp:78
DrawableManager * drawableManager
Pointer to the drawable manager.
Definition Scene.h:106
void Draw()
Draws the scene.
Definition Scene.cpp:148
Terrain * GetTerrain() const
Sets the terrain for the scene using a pointer to a Terrain object.
Definition Scene.cpp:73
void Update()
Updates the scene. Specifically, the broker and managers other than draw.
Definition Scene.cpp:138
void SetCollisionPair()
Sets the collision pair test for the specified collidable types.
Definition Scene.h:238
AlarmableManager * alarmableManager
Pointer to the alarmable manager.
Definition Scene.h:96
void SetTerrain(const std::string &key)
Sets the terrain for the scene using a key.
Definition Scene.cpp:57
void SetCollisionTerrain()
Sets up collision detection between the specified type and the current terrain.
Definition Scene.h:248
Camera * GetCurrentCamera2D() const
Gets the current 2D camera for the scene.
Definition Scene.cpp:52
KeyboardEventManager * keyboardEventManager
Pointer to the keyboard event manager.
Definition Scene.h:101
void SetCurrentCamera(Camera *cam)
Sets the current 3D camera for the scene.
Definition Scene.cpp:37
TerrainManager * terrainManager
Pointer to the current terrain.
Definition Scene.h:116
CollisionManager * collisionManager
Pointer to the collision manager.
Definition Scene.h:111
virtual void Initialize()=0
Initializes the scene. Defined by the user.
SceneRegistrationBroker * registrationBroker
Pointer to the scene registration broker.
Definition Scene.h:86
void Deregister(Updatable *up)
Deregisters an updatable GameObject.
Definition Scene.cpp:83
CameraManager * cameraManager
Pointer to the camera manager.
Definition Scene.h:81
void SetCollisionSelf()
Sets the collision self test for the specified collidable type.
Definition Scene.h:227
void SetCurrentCamera2D(Camera *cam)
Sets the current 2D camera for the scene.
Definition Scene.cpp:47
Manages the registration and execution of commands for scene registration.
Definition SceneRegistrationBroker.h:15
Represents a 3D terrain generated from a heightmap.
Definition Terrain.h:18
Manages the active Terrain instance in the scene.
Definition TerrainManager.h:16
Base class for objects that can be updated in the game loop.
Definition Updatable.h:19
Manages the registration and processing of updatable GameObjects.
Definition UpdatableManager.h:18