ld33_umonster
diff src/dragon.h @ 6:3b4460b34d43
progress
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 23 Aug 2015 05:37:09 +0300 |
parents | |
children | 92d662deb66e |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/dragon.h Sun Aug 23 05:37:09 2015 +0300 1.3 @@ -0,0 +1,30 @@ 1.4 +#ifndef DRAGON_H_ 1.5 +#define DRAGON_H_ 1.6 + 1.7 +#include "vmath/vmath.h" 1.8 + 1.9 +class Dragon { 1.10 +private: 1.11 + Vector3 pos, dir; 1.12 + Vector3 head_pos, target; 1.13 + float head_xlim[2], head_ylim[2]; 1.14 + 1.15 +public: 1.16 + Dragon(); 1.17 + ~Dragon(); 1.18 + 1.19 + void set_position(const Vector3 &p); 1.20 + void set_direction(const Vector3 &dir); 1.21 + void set_target(const Vector3 &p); 1.22 + 1.23 + void set_head_limits(float xmin, float xmax, float ymin, float ymax); 1.24 + void move_head(const Vector3 &p); 1.25 + void move_head(float dx, float dy); 1.26 + const Vector3 &head_position() const; 1.27 + Vector3 breath_dir() const; 1.28 + 1.29 + void update(); 1.30 + void draw() const; 1.31 +}; 1.32 + 1.33 +#endif // DRAGON_H_