Vor Partikeln Stand

This commit is contained in:
Benjamin 2026-05-11 18:06:31 +02:00
parent b4958d535f
commit 58aea455e9
2 changed files with 3 additions and 2 deletions

View file

@ -44,10 +44,12 @@ class Game:
self.player: Player = Player(self, (50, 50), (8, 15))
self.tilemap: Tilemap = Tilemap(self, 16)
try:
self.tilemap.load("map.json")
except FileNotFoundError:
pass
self.clouds: Clouds = Clouds(self.assets["clouds"], count=16)
self.isJumping: bool = False
self.scroll: list[float] = [0, 0]
@ -109,5 +111,4 @@ class Game:
game = Game()
game.run()

View file

@ -10,7 +10,7 @@ class Tile:
def grid_key(self) -> str:
"""Erzeugt den String-Key für die Tilemap."""
return f"{self.pos[0]};{self.pos[1]}"
def to_dict(self) -> dict:
"""Konvertiert zurück in ein Dict (für JSON-Speicherung)."""
return {