blob: 0153c24070def641e0c9d055e62753cfce3222dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef __CORPSE_HPP__
#define __CORPSE_HPP__
#include "Entity.hpp"
class Corpse : public Entity
{
public:
void startup(SimBase *sim);
void update();
void draw();
bool isCreated() const { return body ? true : false; }
bool toBeDestroyed = false;
void setup(b2Vec2 pos, b2Vec2 lVel, float angle, float aVel);
private:
void destroy();
unsigned lifetime = 0;
float energy = 0.f;
friend class ContactListener;
friend class Guppie;
};
#endif // __CORPSE_HPP__
|