mine implementation
This commit is contained in:
+3
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user