This commit is contained in:
Asuro
2025-06-21 11:06:05 +02:00
parent d6bec9e870
commit 05cf88d986
3 changed files with 11 additions and 5 deletions

View File

@@ -279,13 +279,13 @@ namespace Game
} }
return height >= 110 && height <= 125; return height >= 110 && height <= 125;
} }
if (offsetX >= 0 && offsetX < puz.Data.WidthTiles / Puzzle::Config::CardSize && if (offsetX == 1 && offsetY == puz.Data.HeightTiles / Puzzle::Config::CardSize)
offsetY == puz.Data.HeightTiles / Puzzle::Config::CardSize)
{ {
if (puz.IsSolved) if (puz.IsSolved)
{ {
return true; return true;
} }
return true; // TODO!
} }
} }
return false; return false;
@@ -596,11 +596,13 @@ namespace Game
} }
auto& wall = level.PuzzleTiles.Get(WallHandle); auto& wall = level.PuzzleTiles.Get(WallHandle);
wall.EData.Visible = true; wall.EData.Visible = true;
wall.EData.Transform.Position = WorldPosition + Vec3{30.0f, -5.0f, 40.2f}; wall.EData.Transform.Position =
WorldPosition + Vec3{0.0f, 0.0f, Data.HeightTiles * 5.0f} + Vec3{30.0f, -5.0f, 0.2f};
auto& door = level.PuzzleTiles.Get(DoorHandle); auto& door = level.PuzzleTiles.Get(DoorHandle);
door.EData.Visible = !IsSolved; door.EData.Visible = !IsSolved;
door.EData.Transform.Position = WorldPosition + Vec3{30.0f, -5.0f, 40.2f}; door.EData.Transform.Position =
WorldPosition + Vec3{0.0f, 0.0f, Data.HeightTiles * 5.0f} + Vec3{30.0f, -5.0f, 0.2f};
} }
void Level::ReloadLevelEntities() void Level::ReloadLevelEntities()

View File

@@ -27,7 +27,6 @@ namespace Game
void Setup(); void Setup();
void Update(); void Update();
void Reset(); // TODO!
}; };
class Level class Level

View File

@@ -668,6 +668,11 @@ namespace Tools
{ {
if (ImGui::Button("Spiel Neustarten")) if (ImGui::Button("Spiel Neustarten"))
{ {
player.PlayerCamTransform.Position = {0.0f, 3.0f, 0.0f};
for (int32_t i = 0; i < BX_COUNTOF(level.Puzzles); ++i)
{
Puzzle::ResetPuzzle(level.Puzzles[i].Data);
}
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("Zurück zum Anfang")) if (ImGui::Button("Zurück zum Anfang"))