![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
A base manager. More...
#include <Manager.h>
Public Types | |
enum | Module { FIELD = 0 , BATTLE = 1 , WORLD = 2 } |
The modules the entity manager can handle. More... | |
Public Member Functions | |
Manager () | |
Constructor. More... | |
virtual | ~Manager () |
Destructor. More... | |
Module | GetModule () const |
Retrieves the currently selected module. More... | |
bool | IsModule (const Module module) const |
Checks the currently selected module. More... | |
bool | IsFieldModule () const |
Checks if the currently selected module is the field module. More... | |
bool | IsBattleModule () const |
Checks if the currently selected module is the battle module. More... | |
bool | IsWorldModule () const |
Checks if the currently selected module is the world module. More... | |
void | SetModule (const Module module) |
Sets the current module for the entity manager. More... | |
void | SetFieldModule () |
Sets the current module to the field mode. More... | |
void | SetBattleModule () |
Sets the current module to the battle mode. More... | |
void | SetWorldModule () |
Sets the current module to the world map mode. More... | |
void | SetPreviousModule () |
Sets the module that was loaded before a battle. More... | |
virtual void | Input (const VGears::Event &event)=0 |
Handles an input event. More... | |
void | Update () |
Called every frame, performs an update on the things controlled by the manager. More... | |
virtual void | UpdateDebug ()=0 |
Called every frame, performs an update on the things controlled by the manager. More... | |
virtual void | OnResize ()=0 |
Handles resizing events. More... | |
void | Clear () |
Clears the manager. More... | |
void | Clear (const Module module) |
Clears the manager. More... | |
virtual void | ClearField ()=0 |
Clear all field information in the manager. More... | |
virtual void | ClearBattle ()=0 |
Clear all battle information in the manager. More... | |
virtual void | ClearWorld ()=0 |
Clear all world map information in the manager. More... | |
void | ClearAll () |
Clears the manager. More... | |
void | ScriptSetPaused (const bool paused) |
Handles game pausing. More... | |
Protected Member Functions | |
virtual void | UpdateField ()=0 |
Updates the field entities in the manager. More... | |
virtual void | UpdateBattle ()=0 |
Updates the battle entities in the manager. More... | |
virtual void | UpdateWorld ()=0 |
Updates the world map entities in the manager. More... | |
void | Update (Module module) |
Updates the entities of one module in the manager. More... | |
Protected Attributes | |
Module | module_ |
The currently selected module. More... | |
Module | prev_module_ |
The previous module. More... | |
bool | paused_ |
Indicates if the game is paused. More... | |
A base manager.
Contain functionalities shared by all managers that contains.
enum Manager::Module |
Manager::Manager | ( | ) |
Constructor.
|
virtual |
Destructor.
void Manager::Clear | ( | ) |
Clears the manager.
Clears the manager for the currently loaded module. Check {
void Manager::Clear | ( | const Module | module | ) |
Clears the manager.
Clears the manager for the selected module. Check {
[in] | module | The module to clear. |
void Manager::ClearAll | ( | ) |
Clears the manager.
Clears the entity manager for every module. Check {
|
pure virtual |
Clear all battle information in the manager.
Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.
|
pure virtual |
Clear all field information in the manager.
Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.
|
pure virtual |
Clear all world map information in the manager.
Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.
Manager::Module Manager::GetModule | ( | ) | const |
Retrieves the currently selected module.
|
pure virtual |
Handles an input event.
[in] | event | Event to handle. |
Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.
bool Manager::IsBattleModule | ( | ) | const |
Checks if the currently selected module is the battle module.
bool Manager::IsFieldModule | ( | ) | const |
Checks if the currently selected module is the field module.
bool Manager::IsModule | ( | const Module | module | ) | const |
Checks the currently selected module.
[in] | module | The module to check. |
bool Manager::IsWorldModule | ( | ) | const |
Checks if the currently selected module is the world module.
|
pure virtual |
Handles resizing events.
Implemented in UiManager, AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, and ScriptManager.
void Manager::ScriptSetPaused | ( | const bool | paused | ) |
Handles game pausing.
[in] | paused | True to pause, false to resume. |
void Manager::SetBattleModule | ( | ) |
Sets the current module to the battle mode.
Setting the field module will not clear the information stored in the field and world modules.
void Manager::SetFieldModule | ( | ) |
Sets the current module to the field mode.
Setting the field module will clear all the information stored in the battle and world modules.
void Manager::SetModule | ( | const Module | module | ) |
Sets the current module for the entity manager.
Operation availability and entity visibility will depend on the loaded module. Check {
void Manager::SetPreviousModule | ( | ) |
Sets the module that was loaded before a battle.
Calling this will call either {
void Manager::SetWorldModule | ( | ) |
Sets the current module to the world map mode.
Setting the world module will clear all the information stored in the battle and field modules.
void Manager::Update | ( | ) |
Called every frame, performs an update on the things controlled by the manager.
It's functionality may be dependent on the current module.
|
protected |
Updates the entities of one module in the manager.
[in] | module | The module whose entities to update. |
|
protectedpure virtual |
Updates the battle entities in the manager.
Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.
|
pure virtual |
Called every frame, performs an update on the things controlled by the manager.
It must update debug contents. It's functionality may depend on the current module.
Implemented in DialogsManager, AudioManager, BattleManager, CameraManager, EntityManager, InputManager, ScriptManager, and UiManager.
|
protectedpure virtual |
Updates the field entities in the manager.
Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.
|
protectedpure virtual |
Updates the world map entities in the manager.
Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.
|
protected |
The currently selected module.
|
protected |
Indicates if the game is paused.
|
protected |
The previous module.