Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Player.h
Go to the documentation of this file.
1/*
2Olympe Engine V2 2025
3Nicolas Chereau
4nchereau@gmail.com
5
6Purpose:
7- Class representing a player in the game, derived from GameObject.
8- Handles Joypads and Input Mapping.
9- Manages Events for collisions, interactions, and state changes.
10
11*/
12#pragma once
13#include "GameObject.h"
14class Player : public GameObject
15{
16 public:
17 Player() = default;
18 virtual ~Player() override = default;
19 virtual EntityType GetEntityType() const override { return EntityType::Player; }
20
21 static bool FactoryRegistered;
22 static Object* Create();
23
24 int m_PlayerID = -1; // unique player ID assigned to this Player instance
25 int m_ControllerID = -1; // controller instance ID assigned to this Player instance
26 string m_PlayerName = "Unnamed_Player";
27};
28
EntityType
Definition GameObject.h:22
string m_PlayerName
Definition Player.h:26
virtual ~Player() override=default
static bool FactoryRegistered
Definition Player.h:21
virtual EntityType GetEntityType() const override
Definition Player.h:19
Player()=default
int m_ControllerID
Definition Player.h:25
int m_PlayerID
Definition Player.h:24
static Object * Create()
Definition Player.cpp:19