+ inv = new int[9];
+ hp = 20;
+ }
+
+ public void respawn(GameWorld world) {
+ pos.set(getSpawnPoint(world));
+ move.setZero();
+ hp = 20;
+ }
+
+ private Vector2 getSpawnPoint(GameWorld world) {
+ int x = 0, y;
+ for (y = 0; y < world.getHeight(); y++) {
+ if (y == world.getHeight() - 1) {
+ y = 60;
+ world.setForeMap(x, y, 1);
+ break;
+ }
+ if (world.getForeMap(x, y) > 0 && GameItems.getBlock(world.getForeMap(x, y)).coll) break;
+ }
+ x = x * 16 + texWidth / 2;
+ y = y * 16 - height;
+ return new Vector2(x, y);