This commit is contained in:
2016-06-22 03:02:51 +02:00
parent cfb8a7ada8
commit e7c7dbaf39
4 changed files with 6 additions and 19 deletions
+2 -5
View File
@@ -268,7 +268,7 @@ float World::getHeight(float x, float y)
void World::draw()
{
player->setCamera();
float lightPosition[4] = { 0, 2, 1, 0 };
glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
@@ -281,9 +281,6 @@ void World::draw()
GLfloat mat_specular[] = { 0.15, 0.15, 0.15, 0 };
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
player->setCamera();
skybox->draw();
player->draw();
@@ -340,7 +337,7 @@ void World::update(float elapsedTime)
if (enemy->attack)
{
remove = true;
player->HpDown(enemy->damage);
continue;
}
enemy->position.y = getHeight(enemy->position.x, enemy->position.z) + 2.0f;