RType
Public Member Functions | List of all members
Player Class Reference

#include <Player.hpp>

Inheritance diagram for Player:
Inheritance graph
[legend]
Collaboration diagram for Player:
Collaboration graph
[legend]

Public Member Functions

 Player (ServerSocket *socket)
 Construct a new Player:: Player object. More...
 
 ~Player () override=default
 Destroy the Player:: Player object. More...
 
PacketgetPacket () override
 getPacket, get the packet More...
 
void draw () override
 draw, draw the player More...
 
- Public Member Functions inherited from Drawable
 Drawable ()
 Construct a new Drawable:: Drawable object. More...
 
char * getAttribute () const
 getAttribute, get the attribute More...
 
void setAttribute (std::string attribute)
 setAttribute, set the attribute More...
 
Position getPosition () const
 getPosition, get the position More...
 
void setPosition (std::tuple< float, float > position)
 setPosition, set the position More...
 
Size getSize () const
 getSize, get the size More...
 
void setSize (std::tuple< float, float > size)
 setSize, set the size More...
 
float getScale () const
 getScale, get the scale More...
 
void setScale (float scale)
 setScale, set the scale More...
 
Rect getRect () const
 getRect, get the rect More...
 
void setRect (std::tuple< int, int, int, int > rect)
 setRect, set the rect More...
 
std::shared_ptr< PacketgetPacket ()
 getPacket, get the packet More...
 
void setHasChanged (bool hasChanged)
 setHasChanged, set if the drawable has changed More...
 
bool getHasChanged () const
 getHasChanged, get if the drawable has changed More...
 
void addDrawableCollision (std::shared_ptr< Drawable > drawableCollision)
 addDrawableCollision, add a drawable collision More...
 
std::vector< std::shared_ptr< Drawable > > getDrawablesCollision () const
 getDrawablesCollision, get the drawables collision More...
 
- Public Member Functions inherited from IComponentRType
virtual ~IComponentRType ()=default
 Construct a new IComponentRType object. More...
 
- Public Member Functions inherited from IObject
virtual ~IObject ()=default
 

Additional Inherited Members

- Public Attributes inherited from Drawable
int _textureId
 
bool _toDelete = false
 
int _score = 0
 
- Protected Attributes inherited from Drawable
Position _position
 
Size _size
 
Rect _rect
 
float _scale
 
bool hasChanged = false
 
std::vector< std::shared_ptr< Drawable > > _drawablesCollision
 
- Protected Attributes inherited from IComponentRType
char * _attribute
 

Detailed Description

Definition at line 14 of file Player.hpp.

Constructor & Destructor Documentation

◆ Player()

Player::Player ( ServerSocket socket)
explicit

Construct a new Player:: Player object.

Parameters
socket

Definition at line 14 of file Player.cpp.

◆ ~Player()

Player::~Player ( )
overridedefault

Destroy the Player:: Player object.

Member Function Documentation

◆ draw()

void Player::draw ( )
override

draw, draw the player

Definition at line 26 of file Player.cpp.

References getPacket().

Here is the call graph for this function:

◆ getPacket()

Packet * Player::getPacket ( )
overridevirtual

getPacket, get the packet

Returns
packet (Packet *)

Implements IObject.

Definition at line 51 of file Player.cpp.

Referenced by draw().

Here is the caller graph for this function:

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