Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Player Class Reference

#include <Player.h>

+ Inheritance diagram for Player:
+ Collaboration diagram for Player:

Public Member Functions

 Player ()=default
 
virtual ~Player () override=default
 
virtual EntityType GetEntityType () const override
 
- Public Member Functions inherited from GameObject
 GameObject ()
 
virtual ~GameObject () override=default
 
virtual ObjectType GetObjectType () const
 
void SetPosition (Vector &_p)
 
Vector GetPosition () const
 
Vector GetRenderPosition () const
 
void SetSize (float w, float h)
 
void GetSize (float &w, float &h) const
 
SDL_FRect GetBoundingBox () const
 
void SetBoundingbox (const SDL_FRect &box)
 
void SetDynamic (bool b)
 
bool IsDynamic () const
 
virtual void OnEvent (const Message &msg) override
 
void Render ()
 
std::string Save () const
 
bool Load (const std::string &json)
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual void Process ()
 
uint64_t GetUID () const
 

Static Public Member Functions

static ObjectCreate ()
 
- Static Public Member Functions inherited from GameObject
static ObjectCreate ()
 

Public Attributes

int m_PlayerID = -1
 
int m_ControllerID = -1
 
string m_PlayerName = "Unnamed_Player"
 
- Public Attributes inherited from Object
std::string name = "unnamed_object"
 

Static Public Attributes

static bool FactoryRegistered = ObjectFactory::Get().Register("Player", Player::Create)
 
- Static Public Attributes inherited from GameObject
static bool FactoryRegistered = ObjectFactory::Get().Register("GameObject", Create)
 

Additional Inherited Members

- Protected Attributes inherited from GameObject
Vector position
 
Vector vRenderPosition
 
float width = 100.0f
 
float height = 150.0f
 
SDL_FRect boundingBox = { 0.0f, 0.0f, 0.0f, 0.0f }
 
bool isDynamic = false
 
- Protected Attributes inherited from Object
uint64_t uid = 0
 

Detailed Description

Definition at line 14 of file Player.h.

Constructor & Destructor Documentation

◆ Player()

Player::Player ( )
default

Referenced by Create().

+ Here is the caller graph for this function:

◆ ~Player()

virtual Player::~Player ( )
overridevirtualdefault

Member Function Documentation

◆ Create()

Object * Player::Create ( )
static

Definition at line 19 of file Player.cpp.

References ObjectFactory::AddComponent(), ObjectFactory::Get(), GetComponentTypeID_Static(), Player(), Random_Int(), and _Sprite::SetSprite().

+ Here is the call graph for this function:

◆ GetEntityType()

virtual EntityType Player::GetEntityType ( ) const
inlineoverridevirtual

Reimplemented from GameObject.

Definition at line 19 of file Player.h.

References Player.

Member Data Documentation

◆ FactoryRegistered

bool Player::FactoryRegistered = ObjectFactory::Get().Register("Player", Player::Create)
static

Definition at line 21 of file Player.h.

◆ m_ControllerID

int Player::m_ControllerID = -1

Definition at line 25 of file Player.h.

◆ m_PlayerID

int Player::m_PlayerID = -1

Definition at line 24 of file Player.h.

◆ m_PlayerName

string Player::m_PlayerName = "Unnamed_Player"

Definition at line 26 of file Player.h.


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