![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <VideoGame.h>
Collaboration diagram for VideoGame:Public Member Functions | |
| VideoGame () | |
| virtual | ~VideoGame () |
| void | SetState (GameState s) |
| GameState | GetState () const |
| bool | IsPaused () const |
| void | Pause () |
| void | Resume () |
| void | RequestQuit () |
| void | SetViewportLayout (short playerID) |
| EntityID | AddPlayerEntity (string _playerPrefabName="Player") |
| bool | RemovePlayerEntity (const EntityID eid) |
| void | RegisterLoadedPlayerEntity (EntityID entity) |
| bool | IsInputDeviceAvailable () const |
| bool | SaveGame (int slot=0) |
| bool | LoadGame (int slot=0) |
| virtual void | RegisterPrefabItems () |
| void | InitializeAITestScene () |
Static Public Member Functions | |
| static VideoGame & | GetInstance () |
| static VideoGame & | Get () |
Public Attributes | |
| World & | world = World::GetInstance() |
| GameRules & | gamerules = GameRules::GetInstance() |
| GameMenu & | gamemenu = GameMenu::GetInstance() |
| QuestManager & | questmanager = QuestManager::GetInstance() |
| ViewportManager & | viewport = ViewportManager::GetInstance() |
| std::vector< EntityID > | m_playersEntity |
Static Public Attributes | |
| static short | m_playerIdCounter = 0 |
Private Attributes | |
| string | name |
| GameState | m_state = GameState::GameState_Running |
Definition at line 21 of file VideoGame.h.
| VideoGame::VideoGame | ( | ) |
Definition at line 20 of file VideoGame.cpp.
References GameState_Running, ViewportManager::Initialize(), InitializeAITestScene(), name, RegisterPrefabItems(), GameEngine::screenHeight, GameEngine::screenWidth, GameStateManager::SetState(), SYSTEM_LOG, and viewport.
Here is the call graph for this function:
|
virtual |
Definition at line 41 of file VideoGame.cpp.
References SYSTEM_LOG.
Definition at line 49 of file VideoGame.cpp.
References InputsManager::AddPlayerEntityIndex(), InputsManager::AutoBindControllerToPlayer(), Camera, Controller_data::controllerID, Message::Create(), PrefabFactory::CreateEntityFromPrefabName(), InputsManager::Get(), PrefabFactory::Get(), EventQueue::Get(), World::Get(), InputsManager::GetAvailableJoystickCount(), CameraSystem::GetCameraEntityForPlayer(), World::GetComponent(), GetComponentTypeID_Static(), World::GetSystem(), World::HasComponent(), INVALID_ENTITY_ID, IsInputDeviceAvailable(), m_playerIdCounter, m_playersEntity, Olympe_EventType_Camera_Target_Follow, EventQueue::Push(), SetViewportLayout(), SYSTEM_LOG, and world.
Here is the call graph for this function:Definition at line 34 of file VideoGame.h.
References GetInstance().
Referenced by GameMenu::Activate(), GameMenu::Deactivate(), World::InstantiateEntity(), GameEventConsumeSystem::Process(), World::RegisterPlayerEntity(), and GameMenu::ValidateSelection().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 29 of file VideoGame.h.
References GetComponentTypeID_Static().
Referenced by Get(), and GameEngine::Initialize().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 43 of file VideoGame.h.
References GameStateManager::GetState().
Here is the call graph for this function:| void VideoGame::InitializeAITestScene | ( | ) |
Definition at line 579 of file VideoGame.cpp.
References VisualSprite_data::color, PrefabFactory::CreateEntity(), PrefabFactory::Get(), World::Get(), World::GetComponent(), GetComponentTypeID_Static(), INVALID_ENTITY_ID, Identity_data::isPersistent, and Position_data::position.
Referenced by VideoGame().
Here is the call graph for this function:
Here is the caller graph for this function:| bool VideoGame::IsInputDeviceAvailable | ( | ) | const |
Definition at line 152 of file VideoGame.cpp.
References InputsManager::Get(), InputsManager::GetAvailableJoystickCount(), GetComponentTypeID_Static(), and InputsManager::IsKeyboardAssigned().
Referenced by AddPlayerEntity(), and RegisterLoadedPlayerEntity().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 44 of file VideoGame.h.
References GameStateManager::IsPaused().
Here is the call graph for this function:Definition at line 64 of file VideoGame.h.
Referenced by GameEventConsumeSystem::Process().
Here is the caller graph for this function:
|
inline |
Definition at line 46 of file VideoGame.h.
References GameState_Paused, and SetState().
Referenced by GameMenu::Activate().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 161 of file VideoGame.cpp.
References InputsManager::AddPlayerEntityIndex(), InputsManager::AutoBindControllerToPlayer(), Camera, Controller_data::controllerID, Message::Create(), InputsManager::Get(), EventQueue::Get(), World::Get(), CameraSystem::GetCameraEntityForPlayer(), World::GetComponent(), GetComponentTypeID_Static(), World::GetSystem(), World::HasComponent(), INVALID_ENTITY_ID, IsInputDeviceAvailable(), m_playerIdCounter, m_playersEntity, Olympe_EventType_Camera_Target_Follow, EventQueue::Push(), SetViewportLayout(), SYSTEM_LOG, and world.
Referenced by World::RegisterPlayerEntity().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Definition at line 295 of file VideoGame.cpp.
Referenced by VideoGame().
Here is the caller graph for this function:Definition at line 147 of file VideoGame.cpp.
|
inline |
Definition at line 48 of file VideoGame.h.
References GameState_Quit, and SetState().
Referenced by GameMenu::ValidateSelection().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 47 of file VideoGame.h.
References GameState_Running, and SetState().
Referenced by GameMenu::Deactivate().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 63 of file VideoGame.h.
Definition at line 38 of file VideoGame.h.
References GetComponentTypeID_Static(), m_state, and GameStateManager::SetState().
Referenced by Pause(), RequestQuit(), and Resume().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 263 of file VideoGame.cpp.
References ViewportManager::AddPlayer(), GetComponentTypeID_Static(), m_playersEntity, viewport, ViewportLayout_Grid1x1, ViewportLayout_Grid2x1, ViewportLayout_Grid2x2, ViewportLayout_Grid3x1, ViewportLayout_Grid3x2, and ViewportLayout_Grid4x2.
Referenced by AddPlayerEntity(), and RegisterLoadedPlayerEntity().
Here is the call graph for this function:
Here is the caller graph for this function:| GameMenu& VideoGame::gamemenu = GameMenu::GetInstance() |
Definition at line 86 of file VideoGame.h.
| GameRules& VideoGame::gamerules = GameRules::GetInstance() |
Definition at line 85 of file VideoGame.h.
|
static |
Definition at line 92 of file VideoGame.h.
Referenced by AddPlayerEntity(), AI_Player::Initialize(), RegisterLoadedPlayerEntity(), and AI_Player::~AI_Player().
| std::vector<EntityID> VideoGame::m_playersEntity |
Definition at line 91 of file VideoGame.h.
Referenced by AddPlayerEntity(), RegisterLoadedPlayerEntity(), and SetViewportLayout().
|
private |
Definition at line 97 of file VideoGame.h.
Referenced by SetState().
|
private |
Definition at line 95 of file VideoGame.h.
Referenced by VideoGame().
| QuestManager& VideoGame::questmanager = QuestManager::GetInstance() |
Definition at line 87 of file VideoGame.h.
| ViewportManager& VideoGame::viewport = ViewportManager::GetInstance() |
Definition at line 88 of file VideoGame.h.
Referenced by SetViewportLayout(), and VideoGame().
| World& VideoGame::world = World::GetInstance() |
Definition at line 84 of file VideoGame.h.
Referenced by AddPlayerEntity(), and RegisterLoadedPlayerEntity().