Imported the Codebase's scene framework page back to this wiki
+1
-1
@@ -8,7 +8,7 @@ This guide should help you to understand this project, as well as helping me to
|
||||
|
||||
## The Client
|
||||
|
||||
* [Scene System](wiki/Scene-System)
|
||||
* [Scene Framework](wiki/Scene-Framework)
|
||||
* [Graphics System](wiki/Graphics-System)
|
||||
* Player System (WIP)
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
The scene system is the backbone of the game client, utilizing the [strategy pattern](http://en.wikipedia.org/wiki/Strategy_pattern) to control various different logical scenarios found throughout the game (the main menu, the game world, combat scenarios, etc). It consists of the following files:
|
||||
This page was copied from the [Codebase wiki](https://github.com/Ratstail91/Codebase/wiki/Scene-Framework).
|
||||
|
||||
* [scene_list.hpp](https://github.com/Ratstail91/Tortuga/blob/master/client/scene_list.hpp)
|
||||
* [base_scene.hpp](https://github.com/Ratstail91/Tortuga/blob/master/client/base_scene.hpp)
|
||||
* [base_scene.cpp](https://github.com/Ratstail91/Tortuga/blob/master/client/base_scene.cpp)
|
||||
* [scene_manager.hpp](https://github.com/Ratstail91/Tortuga/blob/master/client/scene_manager.hpp)
|
||||
* [scene_manager.cpp](https://github.com/Ratstail91/Tortuga/blob/master/client/scene_manager.cpp)
|
||||
* [main.cpp](https://github.com/Ratstail91/Tortuga/blob/master/client/main.cpp)
|
||||
The scene framework is the backbone of the program, utilizing the [strategy pattern](http://en.wikipedia.org/wiki/Strategy_pattern) to control various different logical scenarios found throughout the game (the main menu, the game world, combat scenarios, etc). It consists of the following files:
|
||||
|
||||
* [scene_list.hpp](https://github.com/Ratstail91/Codebase/blob/master/scene-framework/scene_list.hpp)
|
||||
* [base_scene.hpp](https://github.com/Ratstail91/Codebase/blob/master/scene-framework/base_scene.hpp)
|
||||
* [base_scene.cpp](https://github.com/Ratstail91/Codebase/blob/master/scene-framework/base_scene.cpp)
|
||||
* [scene_manager.hpp](https://github.com/Ratstail91/Codebase/blob/master/scene-framework/scene_manager.hpp)
|
||||
* [scene_manager.cpp](https://github.com/Ratstail91/Codebase/blob/master/scene-framework/scene_manager.cpp)
|
||||
* [main.cpp](https://github.com/Ratstail91/Codebase/blob/master/scene-framework/main.cpp)
|
||||
|
||||
## Breakdown
|
||||
|
||||
@@ -16,7 +18,7 @@ The scene system is the backbone of the game client, utilizing the [strategy pat
|
||||
|
||||
## Instructions
|
||||
|
||||
To add a new scene to the game, create a class that inherits from `BaseScene`, overriding any or all of it's members. Then, include the class's header into `scene_manager.cpp` where it's [indicated](https://github.com/Ratstail91/Tortuga/blob/master/client/scene_manager.cpp#L9). Finally, add a new macro for your scene to `scene_list.hpp`, and modify `SceneManager::LoadScene(SceneIndex)` to include that macro and your scene's constructor.
|
||||
To add a new scene to the game, create a class that inherits from `BaseScene`, overriding any or all of it's members. Then, include the class's header into `scene_manager.cpp` where it's [indicated](https://github.com/Ratstail91/Codebase/blob/master/scene-framework/scene_manager.cpp#L30). Finally, add a new macro for your scene to `scene_list.hpp`, and modify `SceneManager::LoadScene(SceneIndex)` to include that macro and your scene's constructor.
|
||||
Here's an example, using a class called `NewScene`:
|
||||
|
||||
```c++
|
||||
Reference in New Issue
Block a user