Added rumble on enemy hit, added try for teleport

This commit is contained in:
jancoow
2016-06-22 02:58:45 +02:00
parent c9e5be2573
commit 2230682a85
8 changed files with 42 additions and 2 deletions
+8 -1
View File
@@ -6,6 +6,8 @@
#include <fstream>
#include <iostream>
#include <algorithm>
#include <stdlib.h>
#include <cstdlib>
#include "WorldHandler.h"
World::World(const std::string &fileName)
@@ -220,7 +222,12 @@ World::World(const std::string &fileName)
}
}
Vec2f World::randomPosition(void){
int randNum = rand()%(entities.size() + 1);
Vec3f position = entities[randNum]->position;
Vec2f position2 = Vec2f(position.x+100, position.y+100);
return position2;
}
World::~World()
{
delete heightmap;