playable moar

This commit is contained in:
2026-10-18 12:17:24 -04:00
parent b02187d8ad
commit 1643c2fdaf
+9 -3
View File
@@ -288,7 +288,7 @@ void Engine::Initiate()
netText->text = "";
netText->fontsize = 0.5f;
netText->Color = { 1.0f, 1.0f, 1.0f };
netText->t2d.position = { 1.0f, 0.0f, 0.0f, 40.0f };
netText->t2d.position = { 1.0f, 0.0f, 0.0f, 110.0f };
netText->t2d.center = { 1.0f, 0.0f };
netText->textCenter = { 1.0f, 0.5f };
netText->t2d.size = { 0.0f, 0.0f, 360.0f, 40.0f };
@@ -309,12 +309,12 @@ void Engine::Initiate()
TextBox* hpText = new TextBox();
hpText->font = arial;
hpText->text = "100/100 HP";
hpText->fontsize = 0.7f;
hpText->fontsize = 0.6f;
hpText->Color = { 1.0f, 1.0f, 1.0f };
hpText->t2d.position = { 0.0f, 1.0f, 20.0f, -20.0f };
hpText->t2d.center = { 0.0f, 1.0f };
hpText->textCenter = { 0.0f, 0.5f };
hpText->t2d.size = { 0.0f, 0.0f, 220.0f, 50.0f };
hpText->t2d.size = { 0.0f, 0.0f, 400.0f, 90.0f };
hpText->BindToRenderSystem();
TextBox* grappleText = new TextBox();
@@ -457,6 +457,8 @@ void Engine::Initiate()
float slideCooldown = 0.0f;
const float dashCooldownTime = 1.5f; // seconds between dashes
float dashCooldown = 0.0f;
const float shootCooldownTime = 0.5f; // seconds between shots
float shootCooldown = 0.0f;
glm::vec3 slideDir(0.0f);
// Shockwave (key Q): projectile that explodes on the first surface it touches. The blast
@@ -646,8 +648,11 @@ void Engine::Initiate()
camera->ProcessMouseMovement(xoffset, yoffset);
}
else if (buffer.GetType() == Mouse::Event::Type::LPress) {
if (shootCooldown <= 0.0f) {
shootCooldown = shootCooldownTime;
Shoot();
}
}
else if (buffer.GetType() == Mouse::Event::Type::RPress) {
camera->lockedcursor = !camera->lockedcursor;
}
@@ -802,6 +807,7 @@ void Engine::Initiate()
grappleCooldown = std::max(grappleCooldown - deltatime, 0.0f);
slideCooldown = std::max(slideCooldown - deltatime, 0.0f);
dashCooldown = std::max(dashCooldown - deltatime, 0.0f);
shootCooldown = std::max(shootCooldown - deltatime, 0.0f);
const float accel = 40.0f;
const float damp = 0.75f;
const float groundTopSpeed = movespeed * accel * refDt * damp / (1.0f - damp);