![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <CameraEventHandler.h>
Inheritance diagram for CameraEventHandler:
Collaboration diagram for CameraEventHandler:Public Member Functions | |
| void | Initialize () |
| void | Shutdown () |
| virtual void | OnEvent (const Message &msg) override |
| void | TriggerCameraShake (short playerID, float intensity, float duration) |
| void | StopCameraShake (short playerID) |
| void | TeleportCamera (short playerID, float x, float y) |
| void | ZoomCameraTo (short playerID, float targetZoom, float speed) |
| void | RotateCameraTo (short playerID, float targetRotation, float speed) |
| void | ResetCamera (short playerID) |
| void | SetCameraBounds (short playerID, const SDL_FRect &bounds) |
| void | ClearCameraBounds (short playerID) |
| void | FollowTarget (short playerID, EntityID targetEntity) |
| void | FollowTarget_Legacy (short playerID, GameObject *targetObject) |
| void | UnfollowTarget (short playerID) |
Public Member Functions inherited from IMessageListener | |
| virtual | ~IMessageListener ()=default |
Static Public Member Functions | |
| static CameraEventHandler & | GetInstance () |
| static CameraEventHandler & | Get () |
Private Attributes | |
| bool | m_initialized = false |
Definition at line 31 of file CameraEventHandler.h.
|
privatedefault |
|
privatedefault |
|
privatedelete |
|
privatedelete |
Definition at line 194 of file CameraEventHandler.cpp.
References Camera, Message::Create(), EventQueue::Get(), GetComponentTypeID_Static(), Olympe_EventType_Camera_ClearBounds, and EventQueue::Push().
Here is the call graph for this function:Definition at line 207 of file CameraEventHandler.cpp.
References World::Get(), CameraSystem::GetCameraEntityForPlayer(), GetComponentTypeID_Static(), World::GetSystem(), and INVALID_ENTITY_ID.
Here is the call graph for this function:| void CameraEventHandler::FollowTarget_Legacy | ( | short | playerID, |
| GameObject * | targetObject | ||
| ) |
|
inlinestatic |
Definition at line 40 of file CameraEventHandler.h.
References GetInstance().
Referenced by GameEngine::Initialize().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 35 of file CameraEventHandler.h.
References GetComponentTypeID_Static().
Referenced by Get().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 394 of file CameraEventHandler.cpp.
Referenced by OnEvent().
Here is the caller graph for this function:Definition at line 401 of file CameraEventHandler.cpp.
References World::Get(), CameraSystem::GetCameraEntityForPlayer(), World::GetComponent(), GetComponentTypeID_Static(), World::GetSystem(), World::HasComponent(), INVALID_ENTITY_ID, and CameraBounds_data::useBounds.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 421 of file CameraEventHandler.cpp.
Referenced by OnEvent().
Here is the caller graph for this function:Definition at line 370 of file CameraEventHandler.cpp.
References Camera_data::controlOffset, World::Get(), CameraSystem::GetCameraEntityForPlayer(), World::GetComponent(), GetComponentTypeID_Static(), World::GetSystem(), World::HasComponent(), and INVALID_ENTITY_ID.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 338 of file CameraEventHandler.cpp.
References World::Get(), CameraSystem::GetCameraEntityForPlayer(), World::GetComponent(), GetComponentTypeID_Static(), World::GetSystem(), World::HasComponent(), INVALID_ENTITY_ID, and Camera_data::targetRotation.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 237 of file CameraEventHandler.cpp.
References World::Get(), CameraSystem::GetCameraEntityForPlayer(), World::GetComponent(), GetComponentTypeID_Static(), World::GetSystem(), World::HasComponent(), INVALID_ENTITY_ID, and CameraEffects_data::isShaking.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 262 of file CameraEventHandler.cpp.
References World::Get(), CameraSystem::GetCameraEntityForPlayer(), World::GetComponent(), GetComponentTypeID_Static(), World::GetSystem(), World::HasComponent(), INVALID_ENTITY_ID, and CameraEffects_data::isShaking.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 284 of file CameraEventHandler.cpp.
References World::Get(), CameraSystem::GetCameraEntityForPlayer(), World::GetComponent(), GetComponentTypeID_Static(), World::GetSystem(), World::HasComponent(), INVALID_ENTITY_ID, and Camera_data::position.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 428 of file CameraEventHandler.cpp.
References World::Get(), CameraSystem::GetCameraEntityForPlayer(), GetComponentTypeID_Static(), World::GetSystem(), and INVALID_ENTITY_ID.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 306 of file CameraEventHandler.cpp.
References World::Get(), CameraSystem::GetCameraEntityForPlayer(), World::GetComponent(), GetComponentTypeID_Static(), World::GetSystem(), World::HasComponent(), INVALID_ENTITY_ID, and Camera_data::targetZoom.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:| void CameraEventHandler::Initialize | ( | ) |
Definition at line 20 of file CameraEventHandler.cpp.
References m_initialized, and SYSTEM_LOG.
Referenced by GameEngine::Initialize().
Here is the caller graph for this function:Implements IMessageListener.
Definition at line 44 of file CameraEventHandler.cpp.
References GetComponentTypeID_Static(), HandleBoundsEvent(), HandleClearBoundsEvent(), HandleFollowEvent(), HandleResetEvent(), HandleRotateEvent(), HandleShakeEvent(), HandleShakeStopEvent(), HandleTeleportEvent(), HandleUnfollowEvent(), HandleZoomEvent(), Olympe_EventType_Camera_ClearBounds, Olympe_EventType_Camera_Reset, Olympe_EventType_Camera_RotateTo, Olympe_EventType_Camera_SetBounds, Olympe_EventType_Camera_Shake, Olympe_EventType_Camera_Shake_Stop, Olympe_EventType_Camera_Target_Follow, Olympe_EventType_Camera_Target_Unfollow, Olympe_EventType_Camera_Teleport, and Olympe_EventType_Camera_ZoomTo.
Here is the call graph for this function:
|
privatedelete |
|
privatedelete |
Definition at line 160 of file CameraEventHandler.cpp.
References Camera, Message::Create(), EventQueue::Get(), GetComponentTypeID_Static(), Olympe_EventType_Camera_Reset, and EventQueue::Push().
Here is the call graph for this function:Definition at line 145 of file CameraEventHandler.cpp.
References Camera, Message::Create(), EventQueue::Get(), GetComponentTypeID_Static(), Olympe_EventType_Camera_RotateTo, and EventQueue::Push().
Here is the call graph for this function:Definition at line 173 of file CameraEventHandler.cpp.
References World::Get(), CameraSystem::GetCameraEntityForPlayer(), World::GetComponent(), GetComponentTypeID_Static(), World::GetSystem(), World::HasComponent(), INVALID_ENTITY_ID, and CameraBounds_data::useBounds.
Here is the call graph for this function:| void CameraEventHandler::Shutdown | ( | ) |
Definition at line 32 of file CameraEventHandler.cpp.
References m_initialized, and SYSTEM_LOG.
Definition at line 102 of file CameraEventHandler.cpp.
References Camera, Message::Create(), EventQueue::Get(), GetComponentTypeID_Static(), Olympe_EventType_Camera_Shake_Stop, and EventQueue::Push().
Here is the call graph for this function:Definition at line 115 of file CameraEventHandler.cpp.
References Camera, Message::Create(), EventQueue::Get(), GetComponentTypeID_Static(), Olympe_EventType_Camera_Teleport, and EventQueue::Push().
Here is the call graph for this function:Definition at line 87 of file CameraEventHandler.cpp.
References Camera, Message::Create(), EventQueue::Get(), GetComponentTypeID_Static(), Olympe_EventType_Camera_Shake, and EventQueue::Push().
Here is the call graph for this function:Definition at line 221 of file CameraEventHandler.cpp.
References Camera, Message::Create(), EventQueue::Get(), GetComponentTypeID_Static(), Olympe_EventType_Camera_Target_Unfollow, and EventQueue::Push().
Here is the call graph for this function:Definition at line 130 of file CameraEventHandler.cpp.
References Camera, Message::Create(), EventQueue::Get(), GetComponentTypeID_Static(), Olympe_EventType_Camera_ZoomTo, and EventQueue::Push().
Here is the call graph for this function:Definition at line 84 of file CameraEventHandler.h.
Referenced by Initialize(), and Shutdown().