mine implementation

This commit is contained in:
Matteo Benedetto
2025-08-14 16:53:15 +02:00
parent a4b6703d12
commit c35fc9f1f7
13 changed files with 277 additions and 6 deletions
+3 -1
View File
@@ -2,6 +2,7 @@ import os
class Graphics():
def load_assets(self):
print("Loading graphics assets...")
self.tunnel = self.render_engine.load_image("Rat/BMP_TUNNEL.png", surface=True)
self.grasses = [self.render_engine.load_image(f"Rat/BMP_1_GRASS_{i+1}.png", surface=True) for i in range(4)]
self.rat_assets = {}
@@ -16,6 +17,7 @@ class Graphics():
for file in os.listdir("assets/Rat"):
if file.endswith(".png"):
self.assets[file[:-4]] = self.render_engine.load_image(f"Rat/{file}")
# ==================== RENDERING ====================
@@ -65,7 +67,7 @@ class Graphics():
self.blood_stains[position] = new_blood_surface
# Regenerate background to include the updated blood stain
self.regenerate_background()
self.background_texture = None
def scroll_cursor(self, x=0, y=0):
if self.pointer[0] + x > self.map.width or self.pointer[1] + y > self.map.height: