Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/util/kill.h @ 7908

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

orxonox: kill event redesigned

File size: 1.0 KB
RevLine 
[7482]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
[7486]17class Kill
[7482]18{
19
20  public:
[7486]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() {}
[7482]24
25    /** @returns reference to the killer world entity, does not need to exist */
[7486]26    inline WorldEntity* getKiller() const { return this->killer; }
[7482]27    /** @returns reference to the victim world entity, does not need to exist */
[7486]28    inline WorldEntity* getVictim() const { return this->victim; }
[7482]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.