]> Dogcows Code - chaz/yoink/blob - src/Character.hh
converted image management to resource handles
[chaz/yoink] / src / Character.hh
1
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
4 *
5 * vi:ts=4 sw=4 tw=75
6 *
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
9 *
10 **************************************************************************/
11
12 #ifndef _CHARACTER_HH_
13 #define _CHARACTER_HH_
14
15 #include <string>
16
17 #include <boost/shared_ptr.hpp>
18
19 #include <moof/aabb.hh>
20 #include <moof/entity.hh>
21 #include <moof/math.hh>
22 #include <moof/rigid_body.hh>
23 #include <moof/sphere.hh>
24 #include <moof/sprite.hh>
25
26 #include "Animation.hh"
27
28
29 class Character;
30 typedef boost::shared_ptr<Character> CharacterP;
31
32
33 /**
34 * Parent class of animate objects with "personalities." This basically
35 * includes the heroine herself and the bad guys.
36 */
37
38 class Character : public moof::rigid_body2
39 {
40 public:
41
42 Character(const std::string& name);
43 virtual ~Character() {}
44
45 virtual void update(moof::scalar t, moof::scalar dt);
46 virtual void draw(moof::scalar alpha) const;
47
48 void addImpulse(moof::vector2 impulse);
49 void addForce(moof::vector2 force);
50 void setPosition(moof::vector2 position);
51
52 //virtual int getOctant(const moof::Aabb<3>& aabb) const;
53
54 moof::sprite tilemap;
55 Animation animation;
56 };
57
58
59 #endif // _CHARACTER_HH_
60
This page took 0.030901 seconds and 4 git commands to generate.