#include "graphics/Canvas.h"
#include "graphics/Window.h"
#include "world/AABB.h"
+#include "world/Character.h"
#include "world/Entity.h"
#include "world/Tile.h"
#include "world/Tileset.h"
world.SetTile(Vector<int>(2, 9), Tile(0));
world.SetTile(Vector<int>(3, 9), Tile(0));
- Entity e;
- e.bounds = AABB(0, 0, 2, 3);
- e.vbox = AABB(.1, 0, 1.8, 3);
- e.hbox = AABB(0, .1, 2, 1.8);
- e.Move(Vector<float>(5, 0));
- world.AddEntity(e);
+ Character player;
+ player.bounds = AABB(0, 0, 2, 3);
+ player.vbox = AABB(.1, 0, 1.8, 3);
+ player.hbox = AABB(0, .1, 2, 1.8);
+ player.arm = AABB(.5, 1.4, 1, .5);
+ player.armOrigin = Vector<float>(1.4, 1.65);
+ player.Move(Vector<float>(5, 0));
+ world.AddEntity(player);
Entity mob;
mob.bounds = AABB(0, 0, 2, 1.5);
world.AddEntity(mob);
Application app(canv, world, tiles);
- app.Control(e);
+ app.Control(player);
app.Run();
return 0;