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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
#ifndef __el__entity_h
#define __el__entity_h
#include <iostream>
#include <vector>
#include "coordinate.h"
#include "entitytype.h"
#include "tweak/tweak.h"
#include "position.h"
#include "release.h"
namespace PRJID {
class Container;
class Game;
class Entity {
bool collision;
bool collision_y;
C3f dest;
Entity * mdest;
Container *container_;
Game *game_;
unsigned int exploding;
void init();
int ttl;
float speed;
bool m_forward,m_backward,m_left,m_right;
unsigned int myticks;
unsigned int jumping;
public:
Position position;
e_entitytype type;
bool remove;
Entity();
C3f get_position() const;
void set_position(C3f p);
//C3f get_rotation() const;
void set_container(Container *c) { container_=c; }
void set_game(Game *g) { game_=g; }
void draw();
bool isactive();
void set_type(e_entitytype type);
void act(unsigned int ticks);
void tick(unsigned int ticks);
bool trymove(C3f d);
void hit();
void explode();
void drop_bomb();
void move_direction(C3f r,float mod=1.0f);
void move_forward(float mod=1.0f);
void move_backward(float mod=1.0f);
void move_left(float mod=1.0f);
void move_right(float mod=1.0f);
void mark_move_forward();
void mark_move_backward();
void mark_move_left();
void mark_move_right();
void turn_up();
void turn_down();
void turn_left();
void turn_right();
void turn(int x,int y);
void jump();
Entity *clone();
};
} //namespace
#endif
|