current
This commit is contained in:
parent
925b0f69ee
commit
7e36ccf7fb
@ -1,6 +1,7 @@
|
||||
#include "gamecube.h"
|
||||
#include <algorithm>
|
||||
#include <ctime>
|
||||
#include <iostream>
|
||||
//enum game
|
||||
//Ab Zeile 114 if game won
|
||||
//Ab Zeile 148 checking match?
|
||||
@ -91,7 +92,7 @@ int main()
|
||||
// Spielvariablen
|
||||
// -------------------------------------------------------
|
||||
// Nur 3 Farben für 3 Paare
|
||||
int pairCount = 6; // <-- vorerst fixe Anzahl
|
||||
int pairCount = 2; // <-- vorerst fixe Anzahl
|
||||
std::vector<Vec3> positions;
|
||||
std::vector<gamecube> cubes;
|
||||
|
||||
@ -114,11 +115,12 @@ int main()
|
||||
GameState state = GameState::Idle; //legen wir fest, in welchem Zustand das Spiel startet
|
||||
// Klick-Erkennung
|
||||
if (!gameWon
|
||||
&& state != GameState::LockInput //nutzlos gerade
|
||||
&& state != GameState::CheckingMatch //Nutzlos gerade
|
||||
//&& state != GameState::LockInput //nutzlos gerade
|
||||
//&& state != GameState::CheckingMatch //Nutzlos gerade
|
||||
&& IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) {
|
||||
|
||||
// nur im Idle- oder OneFlipped-Zustand wird reagiert<-------------------------------------------------
|
||||
//Wenn einer Dreht, clicken blockieren
|
||||
// ...
|
||||
//Neu Counter
|
||||
counter++;
|
||||
@ -127,6 +129,7 @@ int main()
|
||||
|
||||
for (auto &c : cubes) //Hier die State Logik
|
||||
{
|
||||
std::cout<<("State missing");
|
||||
if (!c.IsFlipped() && !c.IsMatched())
|
||||
{
|
||||
Vector2 screenPos = GetWorldToScreen({c.GetPosition().x, c.GetPosition().y, c.GetPosition().z}, camera);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user