Merge remote-tracking branch 'refs/remotes/origin/developer' into feature/OpenAL

# Conflicts:
#	CrystalPoint.vcxproj.filters
#	Enemy.h
This commit is contained in:
Aaldert
2016-06-05 16:06:48 +02:00
40 changed files with 1581 additions and 367 deletions
+18 -3
View File
@@ -8,14 +8,13 @@
Enemy::Enemy(const std::string &fileName,
const Vec3f &position,
Vec3f &rotation,
const float &scale,
const bool &hasCollision)
const float &scale)
{
model = Model::load(fileName);
this->position = position;
this->rotation = rotation;
this->scale = scale;
this->canCollide = hasCollision;
this->canCollide = true;
target = position;
speed = 1;
radius = 10;
@@ -49,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 (!openal->isMusicPlaying()) {