Fixed crash; Added dev screenshot; Added dependencies into repository

This commit is contained in:
grayson committed 2021-09-27 23:00:04 -05:00
1 parent bf649f5d9f
commit bf2c02e240
496 files changed
+126276 -56

No files matched your search

+3 -11
View File
@@ -52,16 +52,8 @@ void MainState::update(double deltaTime) {
camera->moveLeft(speed * deltaTime);
}
float offset = 0.5f;
if (app->isKeyHeld(NFI_UP))
yrot += offset;
if (app->isKeyHeld(NFI_DOWN))
yrot -= offset;
if (app->isKeyHeld(NFI_LEFT))
xrot += offset;
if (app->isKeyHeld(NFI_RIGHT))
xrot -= offset;
light.setPosition(nf::Vec3(0.0, yrot / 20.0 + 5.0, 0.0));
light.setPosition(nf::Vec3(std::sin(circle) * 10.0, 5.0, std::cos(circle) * 10.0));
circle += 2.0 * deltaTime;
text.setText("FPS: " + std::to_string(app->getFPS()));
@@ -92,7 +84,7 @@ void MainState::render(nf::Renderer& renderer) {
void MainState::onExit() {
Log("MainState onExit!");
xrot = yrot = 0.0f;
circle = 0.0;
entities.clear();
}
+1 -1
View File
@@ -24,7 +24,7 @@ private:
nf::Sound sound;
float xrot, yrot;
double circle;
std::vector<nf::Entity*> entities;
};