Robot Devastation
MentalMapEventListener.hpp
1 // Authors: see AUTHORS.md at project root.
2 // CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
3 // URL: https://github.com/asrob-uc3m/robotDevastation
4 
5 #ifndef __RD_MENTAL_MAP_EVENT_LISTENER_HPP__
6 #define __RD_MENTAL_MAP_EVENT_LISTENER_HPP__
7 
8 #include "Player.hpp"
9 #include "Target.hpp"
10 #include "Weapon.hpp"
11 
12 namespace rd{
13 
22 {
23  public:
30  virtual bool onTargetHit(const Target & target, const Player & player, const Weapon & weapon) = 0;
31 
36  virtual bool onRespawn(const Player & player) = 0;
37 
38  virtual ~MentalMapEventListener() {}
39 };
40 
41 }
42 
43 #endif //-- __RD_MENTAL_MAP_EVENT_LISTENER_HPP__
rd::Player
Class that represents a player of this game, with a 'unique' id, name, health, team id and score.
Definition: Player.hpp:21
rd
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
rd::Weapon
Class that represents a weapon.
Definition: Weapon.hpp:22
rd::MentalMapEventListener::onTargetHit
virtual bool onTargetHit(const Target &target, const Player &player, const Weapon &weapon)=0
This function will be called whenever a target is hit.
rd::Target
Class that represents a target detected. This target is (or should be) associated to a player.
Definition: Target.hpp:18
rd::MentalMapEventListener::onRespawn
virtual bool onRespawn(const Player &player)=0
This function will be called whenever the player is respawned.
rd::MentalMapEventListener
Interface for objects that can be notified of events related to changes on the data stored.
Definition: MentalMapEventListener.hpp:21