RType
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Collision Class Reference

#include <Collision.hpp>

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

Public Member Functions

 Collision (std::shared_ptr< ServerSocket > serverSocket)
 Construct a new Collision:: Collision object. More...
 
void update (std::shared_ptr< Event > event, std::shared_ptr< IComponentRType > component) override
 update, update the collision More...
 
- Public Member Functions inherited from AService
 AService (std::shared_ptr< ServerSocket > serverSocket)
 Construct a new AService:: AService object. More...
 
 ~AService () override=default
 Destroy the AService:: AService object. More...
 
- Public Member Functions inherited from IService
virtual ~IService ()=default
 Construct a new IService:: IService object. More...
 
virtual void update (IGame *game, std::vector< IObject * > objects)=0
 

Static Public Member Functions

static bool checkCollision (const std::shared_ptr< Drawable > &drawable, const std::shared_ptr< Drawable > &other)
 checkCollision, check the collision More...
 
static void cancelMove (const std::shared_ptr< Event > &event, const std::shared_ptr< Drawable > &drawable)
 cancelMove, cancel the move More...
 

Public Attributes

int _score = 0
 

Additional Inherited Members

- Protected Attributes inherited from IService
std::shared_ptr< ServerSocket_serverSocket
 

Detailed Description

Definition at line 12 of file Collision.hpp.

Constructor & Destructor Documentation

◆ Collision()

Collision::Collision ( std::shared_ptr< ServerSocket serverSocket)
inlineexplicit

Construct a new Collision:: Collision object.

Parameters
serverSocket

Definition at line 20 of file Collision.hpp.

References Collision().

Referenced by Collision().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ cancelMove()

void Collision::cancelMove ( const std::shared_ptr< Event > &  event,
const std::shared_ptr< Drawable > &  drawable 
)
static

cancelMove, cancel the move

Parameters
event
drawable

Definition at line 72 of file Collision.cpp.

◆ checkCollision()

bool Collision::checkCollision ( const std::shared_ptr< Drawable > &  drawable,
const std::shared_ptr< Drawable > &  other 
)
static

checkCollision, check the collision

Parameters
drawable
other
Returns
bool (true or false) if there is a collision

Definition at line 53 of file Collision.cpp.

◆ update()

void Collision::update ( std::shared_ptr< Event event,
std::shared_ptr< IComponentRType component 
)
overridevirtual

update, update the collision

Parameters
event
component

Implements AService.

Definition at line 18 of file Collision.cpp.

Member Data Documentation

◆ _score

int Collision::_score = 0

Definition at line 47 of file Collision.hpp.


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