Make it go faster
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Has been cancelled
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
15
main.cpp
15
main.cpp
@@ -150,7 +150,6 @@ public:
|
||||
fov_increasing = false;
|
||||
else if (fov <= 75)
|
||||
fov_increasing = true;
|
||||
J3D::ChangeFOV(fov);
|
||||
|
||||
sprite_radians += 0.005;
|
||||
textAngle.y += .05f;
|
||||
@@ -166,7 +165,7 @@ public:
|
||||
J3D::DrawLine(Colors::Red, {-0.33,-0.125,1}, {-1,-0.125,1});
|
||||
J3D::DrawLine(Colors::Red, {-0.33,-0.125,1}, {-0.33,0.25,1});
|
||||
J3D::DrawString(Colors::Red, "JGL Sample Text", {-0.33, -0.1, 1.0f}, 1.f, 32, FreeSans, textAngle, true);
|
||||
J3D::WireframeSphere(Colors::Green, {0,0,0.05f}, 0.01f, 0.5f);
|
||||
J3D::WireframeSphere(Colors::Green, {0,0,1.f}, 0.25f, 25, 25, 1.f);
|
||||
J3D::End();
|
||||
|
||||
J2D::Begin(j2d_render_target, true);
|
||||
@@ -220,6 +219,18 @@ public:
|
||||
}
|
||||
|
||||
void OnRefresh(float elapsed) override {
|
||||
if (isKeyDown(Keys::RightArrow))
|
||||
camera->angle.y += 45.f * elapsed;
|
||||
if (isKeyDown(Keys::LeftArrow))
|
||||
camera->angle.y -= 45.f * elapsed;
|
||||
if (isKeyDown(Keys::UpArrow))
|
||||
camera->angle.x -= 45.f * elapsed;
|
||||
if (isKeyDown(Keys::DownArrow))
|
||||
camera->angle.x += 45.f * elapsed;
|
||||
if (isKeyDown(Keys::Space))
|
||||
camera->position.y += 1.f * elapsed;
|
||||
if (isKeyDown(Keys::LeftShift))
|
||||
camera->position.y -= 1.f * elapsed;
|
||||
auto mouse = GetMouseCoordinates();
|
||||
a.Update(mouse);
|
||||
b.Update(mouse);
|
||||
|
Reference in New Issue
Block a user