enemy logic added to enemy and out of world

This commit is contained in:
Remco
2016-06-03 11:09:48 +02:00
parent 1c59a3bc6f
commit c3fe041eb1
12 changed files with 49 additions and 39 deletions
+16
View File
@@ -48,6 +48,22 @@ void Enemy::draw()
glPopMatrix();
}
void Enemy::inEyeSight(Vec3f & TargetPosition)
{
if (position.Distance(TargetPosition) <= radius)
{
hasTarget = true;
target = TargetPosition;
}
else
hasTarget = false;
}
bool Enemy::hasCollison(Vec3f &)
{
}
void Enemy::update(float delta)
{
if (hasTarget)