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