Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/test/src/util/kill.h @ 10737

Last change on this file since 10737 was 7486, checked in by patrick, 19 years ago

orxonox: kill event redesigned

File size: 1.0 KB
Line 
1/*!
2 * @file kill.h
3 * @brief Definition of a playable kill. Generated in the case when some playable dies
4*/
5
6#ifndef _KILL_H
7#define _KILL_H
8
9#include "base_object.h"
10
11// FORWARD DECLARATION
12
13class WorldEntity;
14class Playable;
15
16//! A representing a kill event
17class Kill
18{
19
20  public:
21    Kill(WorldEntity* killer, WorldEntity* victim) {  this->killer = killer; this->victim = victim; }
22    Kill(WorldEntity* killer, Playable* victim) {this->killer = killer; this->victim = (WorldEntity*)victim;}
23    virtual ~Kill() {}
24
25    /** @returns reference to the killer world entity, does not need to exist */
26    inline WorldEntity* getKiller() const { return this->killer; }
27    /** @returns reference to the victim world entity, does not need to exist */
28    inline WorldEntity* getVictim() const { return this->victim; }
29
30  private:
31    WorldEntity*         killer;                   //!< reference to the killer world entity
32    WorldEntity*         victim;                   //!< reference to the victim world entity
33
34};
35
36#endif /* _KILL_H */
Note: See TracBrowser for help on using the repository browser.