From de99c5f7636a952025ea13de02bafd25bcb6bdec Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Mon, 17 Aug 2026 20:14:16 -0400 Subject: Fix broken --- 2026/games_submissions/just__jane/src/cut.cpp | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 2026/games_submissions/just__jane/src/cut.cpp (limited to '2026/games_submissions/just__jane/src/cut.cpp') diff --git a/2026/games_submissions/just__jane/src/cut.cpp b/2026/games_submissions/just__jane/src/cut.cpp new file mode 100644 index 0000000..67e4c25 --- /dev/null +++ b/2026/games_submissions/just__jane/src/cut.cpp @@ -0,0 +1,37 @@ +#include "raylib.h" +#include "raymath.h" +#include + +Cut::Cut(Vector2 start, Vector2 end) { + InitAudioDevice(); + this->start_ = start; + this->end_ = end; + this->current_step_ = 0.0; + this->slash_ = LoadSound("assets/slash.wav"); +} + +void Cut::Draw() { + if (this->its_joever) { + return; + } + + Vector2 head = Vector2Lerp(start_, end_, current_step_); + DrawLineV(start_, head, {0x0F, 0x0F, 0x0F, 0x40}); +} + +void Cut::Update() { + if (this->its_joever) { + return; + } + + if (this->current_step_ == 0.0) { + PlaySound(slash_); + } + + if (this->current_step_ >= 1.0) { + this->its_joever = true; + return; + } + + this->current_step_ += (1.0 / 60.0); +} -- cgit v1.3.1