![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <AI_Player.h>
Inheritance diagram for AI_Player:
Collaboration diagram for AI_Player:Public Member Functions | |
| AI_Player () | |
| virtual void | Initialize () override |
| virtual | ~AI_Player () override |
| virtual void | SetOwner (Object *_owner) override |
| virtual void | RenderDebug () |
| virtual void | Process () override |
| virtual void | OnEvent (const Message &msg) override |
Public Member Functions inherited from AIComponent | |
| AIComponent ()=default | |
| virtual | ~AIComponent () override=default |
| virtual ComponentType | GetComponentType () const override |
Public Member Functions inherited from ObjectComponent | |
| ObjectComponent ()=default | |
| virtual | ~ObjectComponent ()=default |
| Object * | GetEntity () const |
| virtual void | SetEntity (Object *_owner) |
| virtual void | Render () |
| Object * | GetOwner () const |
Public Member Functions inherited from Object | |
| Object () | |
| virtual | ~Object () |
| uint64_t | GetUID () const |
Static Public Member Functions | |
| static ObjectComponent * | Create (void) |
Static Public Attributes | |
| static bool | FactoryRegistered = ObjectFactory::Get().Register("AI_Player", AI_Player::Create) |
Private Attributes | |
| SDL_Color | m_debugcolor = { 0, 255, 0, 255 } |
| float | m_speed = 250.0f |
| float | m_axisX = 0.0f |
| float | m_axisY = 0.0f |
| bool | m_keyUp = false |
| bool | m_keyDown = false |
| bool | m_keyLeft = false |
| bool | m_keyRight = false |
| float | m_deadzone = 0.2f |
| std::mutex | m_mutex |
Additional Inherited Members | |
Public Attributes inherited from Object | |
| std::string | name = "unnamed_object" |
Protected Attributes inherited from ObjectComponent | |
| Object * | owner = nullptr |
| GameObject * | gao = nullptr |
Protected Attributes inherited from Object | |
| uint64_t | uid = 0 |
Static Protected Attributes inherited from ObjectComponent | |
| static float & | fDt = GameEngine::fDt |
Definition at line 10 of file AI_Player.h.
|
explicit |
Definition at line 23 of file AI_Player.cpp.
References EventManager::Get(), Olympe_EventType_Joystick_AxisMotion, Olympe_EventType_Joystick_ButtonDown, Olympe_EventType_Joystick_ButtonUp, Olympe_EventType_Joystick_Connected, Olympe_EventType_Joystick_Disconnected, Olympe_EventType_Keyboard_Connected, Olympe_EventType_Keyboard_Disconnected, Olympe_EventType_Keyboard_KeyDown, Olympe_EventType_Keyboard_KeyUp, and EventManager::Register().
Referenced by Create().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Definition at line 56 of file AI_Player.cpp.
References EventManager::Get(), VideoGame::m_playerIdCounter, and EventManager::UnregisterAll().
Here is the call graph for this function:
|
static |
Definition at line 18 of file AI_Player.cpp.
References AI_Player().
Here is the call graph for this function:
|
overridevirtual |
Reimplemented from ObjectComponent.
Definition at line 38 of file AI_Player.cpp.
References InputsManager::AutoBindControllerToPlayer(), ObjectComponent::gao, InputsManager::Get(), GetComponentTypeID_Static(), InputsManager::GetPlayerBinding(), VideoGame::m_playerIdCounter, and SYSTEM_LOG.
Here is the call graph for this function:Reimplemented from AIComponent.
Definition at line 110 of file AI_Player.cpp.
References ObjectComponent::gao, GetComponentTypeID_Static(), m_axisX, m_axisY, m_debugcolor, m_keyDown, m_keyLeft, m_keyRight, m_keyUp, m_mutex, Object::name, Olympe_EventType_Joystick_AxisMotion, Olympe_EventType_Joystick_ButtonDown, Olympe_EventType_Joystick_ButtonUp, Olympe_EventType_Joystick_Connected, Olympe_EventType_Joystick_Disconnected, Olympe_EventType_Keyboard_Connected, Olympe_EventType_Keyboard_Disconnected, Olympe_EventType_Keyboard_KeyDown, Olympe_EventType_Keyboard_KeyUp, and SYSTEM_LOG.
Here is the call graph for this function:
|
overridevirtual |
Reimplemented from AIComponent.
Definition at line 81 of file AI_Player.cpp.
References ObjectComponent::fDt, ObjectComponent::gao, GetComponentTypeID_Static(), GameObject::GetPosition(), m_axisX, m_axisY, m_deadzone, m_keyDown, m_keyLeft, m_keyRight, m_keyUp, m_mutex, m_speed, and GameObject::SetPosition().
Here is the call graph for this function:
|
virtual |
Reimplemented from ObjectComponent.
Definition at line 68 of file AI_Player.cpp.
References Draw_FilledCircle(), ObjectComponent::gao, CameraManager::Get(), GameObject::GetBoundingBox(), CameraManager::GetCameraPositionForActivePlayer(), GetComponentTypeID_Static(), GameObject::GetPosition(), m_debugcolor, and GameEngine::renderer.
Here is the call graph for this function:Reimplemented from AIComponent.
Definition at line 63 of file AI_Player.cpp.
References GetComponentTypeID_Static(), and AIComponent::SetOwner().
Here is the call graph for this function:
|
static |
Definition at line 13 of file AI_Player.h.
|
private |
Definition at line 34 of file AI_Player.h.
|
private |
Definition at line 35 of file AI_Player.h.
Definition at line 41 of file AI_Player.h.
Referenced by Process().
|
private |
Definition at line 29 of file AI_Player.h.
Referenced by OnEvent(), and RenderDebug().
Definition at line 37 of file AI_Player.h.
Definition at line 38 of file AI_Player.h.
Definition at line 39 of file AI_Player.h.
Definition at line 36 of file AI_Player.h.
|
private |
Definition at line 42 of file AI_Player.h.
|
private |
Definition at line 31 of file AI_Player.h.
Referenced by Process().