Author SHA1 Message Date
laemmerzahlkr91200 3a021f72a2 counter fix (again) 2025-12-15 12:29:09 +01:00
laemmerzahlkr91200 560cc4a762 Counter fix and Logik-Deadlock Fix 2025-12-15 12:17:18 +01:00
linkse100241 0d6403a0b8 gitignore update 2025-12-15 11:51:08 +01:00
2 changed files with 13 additions and 5 deletions
+2 -1
View File
@@ -8,4 +8,5 @@ out/
*.o *.o
*.obj *.obj
*.log *.log
idea/ .idea/
+11 -4
View File
@@ -135,6 +135,7 @@ int main()
std::cout<<("State missing"); std::cout<<("State missing");
if (!c.IsFlipped() && !c.IsMatched()) //<--------------- Zustandwechsel anpassen if (!c.IsFlipped() && !c.IsMatched()) //<--------------- Zustandwechsel anpassen
{ {
Vector2 screenPos = GetWorldToScreen( Vector2 screenPos = GetWorldToScreen(
{c.GetPosition().x, c.GetPosition().y, c.GetPosition().z}, camera); {c.GetPosition().x, c.GetPosition().y, c.GetPosition().z}, camera);
@@ -142,16 +143,22 @@ int main()
fabs(mouse.y - screenPos.y) < 40) fabs(mouse.y - screenPos.y) < 40)
{ {
c.FlipForward(); //<-----Animation Start c.FlipForward(); //<-----Animation Start
//Neu Counter
counter++;
if (state == GameState::Idle) //Neu (Ü4) counter++;
if (state == GameState::Idle) //neu Ü4
{
state = GameState::OneFlipped; state = GameState::OneFlipped;
else
}
else if (state == GameState::OneFlipped && first && &c != first)
{
state = GameState::LockInput; state = GameState::LockInput;
}
break; // 🔒 nur EIN Würfel pro Klick break; // 🔒 nur EIN Würfel pro Klick
} }
} }
} }
} }