Character::Character(const std::string& name) :
- tilemap_(name),
- animation_(name)
+ tilemap(name),
+ animation(name)
{
current.init();
current.force = userForce;
current.integrate(t, dt);
- animation_.update(t, dt);
+ animation.update(t, dt);
}
Mf::Vector2 position = cml::lerp(previous.position, current.position, alpha);
//glColor3f(1.0f, 1.0f, 1.0f);
- tilemap_.bind();
+ tilemap.bind();
- Mf::Tilemap::Index frame = animation_.getFrame();
+ Tilemap::Index frame = animation.getFrame();
- Mf::Tilemap::Orientation orientation = Mf::Tilemap::NORMAL;
+ Tilemap::Orientation orientation = Tilemap::NORMAL;
- if (current.velocity[0] < 0.0) orientation = Mf::Tilemap::REVERSE;
+ if (current.velocity[0] < 0.0) orientation = Tilemap::REVERSE;
Mf::Scalar coords[8];
- tilemap_.getTileCoords(frame, coords, orientation);
+ tilemap.getTileCoords(frame, coords, orientation);
Mf::Scalar s = 16.0;
}
-Mf::Tilemap& Character::getTilemap()
-{
- return tilemap_;
-}
-
-Mf::Animation& Character::getAnimation()
-{
- return animation_;
-}
-
-
/** vim: set ts=4 sw=4 tw=80: *************************************************/