4 * Created on: Sep 29, 2012
10 using geometry::Vector;
20 bool Entity::TileLock(int width, int height) const {
21 Vector<int> tilePosition(
22 position.X() - (width / 2),
23 position.Y() - height);
24 return (tilePosition.X() % width == 0) && (tilePosition.Y() % height == 0);
28 void Entity::Update(float deltaT) {
29 position += velocity * deltaT;
33 void Entity::Render(SDL_Surface *dest, const Vector<int> &offset) const {
34 if (animation.Running()) {
35 animation.DrawCenterBottom(dest, offset + position);
37 sprite->DrawCenterBottom(dest, offset + position);