From 7c16ae7261ab9472b8285b0cf0703ecec4ad386c Mon Sep 17 00:00:00 2001 From: Nimra Bhatti Date: Fri, 17 Oct 2025 09:47:12 +0000 Subject: [PATCH] =?UTF-8?q?gamecube.h=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamecube.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 gamecube.h diff --git a/gamecube.h b/gamecube.h new file mode 100644 index 0000000..bbe0028 --- /dev/null +++ b/gamecube.h @@ -0,0 +1,34 @@ +#pragma once +#include "gamematrix.h" +#include "raylib.h" +#include + +struct Vec3 +{ + float x, y, z; +}; + +class gamecube +{ +public: + gamecube(const Vec3 &pos, Color col); + void Update(float flipSpeed); + void FlipForward(); + void FlipBackward(); + bool IsFlipped() const; + bool IsMatched() const; + void SetMatched(bool m); + void Draw() const; + Vec3 GetPosition() const; + float GetRotationY() const; + Color GetColor() const { return color; } + +private: + Vec3 position; + Color color; + bool flipped = false; + bool matched = false; + bool flippingForward = false; + bool flippingBackward = false; + float rotation = 0.0f; +}; \ No newline at end of file