PROG_3B/includes/gamecube.h
2025-11-10 16:20:01 +01:00

35 lines
831 B
C++

#pragma once
#include "gamematrix.h"
#include "raylib.h"
#include "rlgl.h"
struct Vec3 //anisch unnötig weil rylib schon vec3 hat
{
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; }
//zustände klarer abbikden bzw weniger bools = klarare Logik
private:
Vec3 position;
Color color;
bool flipped = false;
bool matched = false;
bool flippingForward = false;
bool flippingBackward = false;
float rotation = 0.0f;
};
// braucht bessere trennung von logik & darstellung