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
+1 -1
View File
@@ -40,7 +40,7 @@ Crystal::~Crystal()
void Crystal::draw() void Crystal::draw()
{ {
crystalRot -= 3.0f; crystalRot -= 0.5f;
rotation = Vec3f(0, crystalRot, 0); rotation = Vec3f(0, crystalRot, 0);
Entity::draw(); Entity::draw();
} }
+1 -11
View File
@@ -75,17 +75,7 @@ void Weapon::draw(){
glScalef(scale, scale, scale); glScalef(scale, scale, scale);
weaponmodel->draw(); weaponmodel->draw();
//Test code for finding anker point
glColor3ub(255, 255, 0);
glTranslatef(ankerPoint.x, ankerPoint.y, ankerPoint.z);
glBegin(GL_LINES);
glVertex2f(0, 4);
glVertex2f(0, -4);
glVertex2f(4, 0);
glVertex2f(-4, 0);
glEnd();
glPopMatrix(); glPopMatrix();
+2 -5
View File
@@ -268,7 +268,7 @@ float World::getHeight(float x, float y)
void World::draw() void World::draw()
{ {
player->setCamera();
float lightPosition[4] = { 0, 2, 1, 0 }; float lightPosition[4] = { 0, 2, 1, 0 };
glLightfv(GL_LIGHT0, GL_POSITION, lightPosition); glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
@@ -281,9 +281,6 @@ void World::draw()
GLfloat mat_specular[] = { 0.15, 0.15, 0.15, 0 }; GLfloat mat_specular[] = { 0.15, 0.15, 0.15, 0 };
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
player->setCamera();
skybox->draw(); skybox->draw();
player->draw(); player->draw();
@@ -340,7 +337,7 @@ void World::update(float elapsedTime)
if (enemy->attack) if (enemy->attack)
{ {
remove = true; player->HpDown(enemy->damage);
continue; continue;
} }
enemy->position.y = getHeight(enemy->position.x, enemy->position.z) + 2.0f; enemy->position.y = getHeight(enemy->position.x, enemy->position.z) + 2.0f;
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"worlds": [ "worlds": [
"worlds/ice.json", "worlds/small.json",
"worlds/rock.json", "worlds/rock.json",
"worlds/small.json" "worlds/ice.json"
] ]
} }