increased floors count, added gaps

This commit is contained in:
Sandro Sobczyński
2020-11-04 22:47:03 +01:00
parent bfd75003a4
commit 1868b714bc
5 changed files with 10 additions and 5 deletions
+2 -2
View File
@@ -45,8 +45,8 @@ void Floor::init(const Mesh &mother, const Point &spiral, const u8 &initOffset)
this->mesh.shouldBeLighted = true;
this->mesh.shouldBeFrustumCulled = true;
this->animDirection = 0;
this->mesh.position.x = spiral.x * 40.0F;
this->mesh.position.z = spiral.y * 40.0F;
this->mesh.position.x = spiral.x * 80.0F;
this->mesh.position.z = spiral.y * 80.0F;
}
/** Check and update animation direction and position
+5
View File
@@ -50,6 +50,11 @@ void Player::update(Pad &pad, Camera &camera, FloorManager &floorManager)
{
this->updatePosition(pad, camera, floorManager);
this->updateGravity(pad, floorManager);
if (mesh.position.y < -60.0F)
{
mesh.position.y = 60.0F;
velocity = 0;
}
}
/** Move player when pad move buttons are pressed and is not blocked by any floor side */