V-Gears 0
Free Final Fantasy VII engine.
Manager Class Referenceabstract

A base manager. More...

#include <Manager.h>

Inheritance diagram for Manager:
Collaboration diagram for Manager:

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...
 

Detailed Description

A base manager.

Contain functionalities shared by all managers that contains.

Member Enumeration Documentation

◆ Module

The modules the entity manager can handle.

Enumerator
FIELD 

Field module.

Used in field maps. It has background, walkmesh, entities...

BATTLE 

Battle module.

Used in battles. During battles there is no walkmesh.

WORLD 

World map module.

Used in the world map. It has background, walkmesh, entities...

Constructor & Destructor Documentation

◆ Manager()

Manager::Manager ( )

Constructor.

◆ ~Manager()

Manager::~Manager ( )
virtual

Destructor.

Member Function Documentation

◆ Clear() [1/2]

void Manager::Clear ( )

Clears the manager.

Clears the manager for the currently loaded module. Check {

See also
ClearField()}, {
ClearBattle()}, {
ClearWorld()} for information about what this does depending on the currently loaded module.

◆ Clear() [2/2]

void Manager::Clear ( const Module  module)

Clears the manager.

Clears the manager for the selected module. Check {

See also
ClearField()}, {
ClearBattle()}, {
ClearWorld()} for information about what this does depending on the currently loaded module.
Parameters
[in]moduleThe module to clear.

◆ ClearAll()

void Manager::ClearAll ( )

Clears the manager.

Clears the entity manager for every module. Check {

See also
ClearField()}, {
ClearBattle()}, {
ClearWorld()} for information about what this does depending on the currently loaded module.

◆ ClearBattle()

virtual void Manager::ClearBattle ( )
pure virtual

Clear all battle information in the manager.

Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.

◆ ClearField()

virtual void Manager::ClearField ( )
pure virtual

Clear all field information in the manager.

Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.

◆ ClearWorld()

virtual void Manager::ClearWorld ( )
pure virtual

Clear all world map information in the manager.

Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.

◆ GetModule()

Manager::Module Manager::GetModule ( ) const

Retrieves the currently selected module.

Returns
The currently selected module.

◆ Input()

virtual void Manager::Input ( const VGears::Event event)
pure virtual

Handles an input event.

Parameters
[in]eventEvent to handle.

Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.

◆ IsBattleModule()

bool Manager::IsBattleModule ( ) const

Checks if the currently selected module is the battle module.

Returns
True if the currently selected module is the battle module, false otherwise.

◆ IsFieldModule()

bool Manager::IsFieldModule ( ) const

Checks if the currently selected module is the field module.

Returns
True if the currently selected module is the field module, false otherwise.

◆ IsModule()

bool Manager::IsModule ( const Module  module) const

Checks the currently selected module.

Parameters
[in]moduleThe module to check.
Returns
True if the currently selected module matches the module to check, false otherwise.

◆ IsWorldModule()

bool Manager::IsWorldModule ( ) const

Checks if the currently selected module is the world module.

Returns
True if the currently selected module is the world module, false otherwise.

◆ OnResize()

virtual void Manager::OnResize ( )
pure virtual

◆ ScriptSetPaused()

void Manager::ScriptSetPaused ( const bool  paused)

Handles game pausing.

Parameters
[in]pausedTrue to pause, false to resume.

◆ SetBattleModule()

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.

◆ SetFieldModule()

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.

◆ SetModule()

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 {

See also
SetFieldModule()}, {
SetBattleModule()} and {
SetWorldModule()} for information about what changing modules implies.

◆ SetPreviousModule()

void Manager::SetPreviousModule ( )

Sets the module that was loaded before a battle.

Calling this will call either {

See also
SetFieldModule()} or {
SetWorldModule}, depending on which module was loaded before. Calling this while not in the battle module will do nothing.

◆ SetWorldModule()

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.

◆ Update() [1/2]

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.

◆ Update() [2/2]

void Manager::Update ( Module  module)
protected

Updates the entities of one module in the manager.

Parameters
[in]moduleThe module whose entities to update.

◆ UpdateBattle()

virtual void Manager::UpdateBattle ( )
protectedpure virtual

Updates the battle entities in the manager.

Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.

◆ UpdateDebug()

virtual void Manager::UpdateDebug ( )
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.

◆ UpdateField()

virtual void Manager::UpdateField ( )
protectedpure virtual

Updates the field entities in the manager.

Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.

◆ UpdateWorld()

virtual void Manager::UpdateWorld ( )
protectedpure virtual

Updates the world map entities in the manager.

Implemented in AudioManager, BattleManager, CameraManager, DialogsManager, EntityManager, InputManager, ScriptManager, and UiManager.

Member Data Documentation

◆ module_

Module Manager::module_
protected

The currently selected module.

◆ paused_

bool Manager::paused_
protected

Indicates if the game is paused.

◆ prev_module_

Module Manager::prev_module_
protected

The previous module.


The documentation for this class was generated from the following files: