]> Dogcows Code - chaz/yoink/blob - src/Character.hh
4140d17249e2b8d822a31c8e8893e09737ef78b4
[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/RigidBody.hh>
23 #include <Moof/Sphere.hh>
24 #include <Moof/Texture.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 Mf::RigidBody2
39 {
40 public:
41
42 Character(const std::string& name);
43 virtual ~Character() {}
44
45 virtual void update(Mf::Scalar t, Mf::Scalar dt);
46 virtual void draw(Mf::Scalar alpha) const;
47
48 void addImpulse(Mf::Vector2 impulse);
49 void addForce(Mf::Vector2 force);
50 void setPosition(Mf::Vector2 position);
51
52 //virtual int getOctant(const Mf::Aabb<3>& aabb) const;
53
54 Mf::Texture tilemap;
55 Animation animation;
56 };
57
58
59 #endif // _CHARACTER_HH_
60
This page took 0.03041 seconds and 3 git commands to generate.