Add unit tests for UnitFactory functionality and initialize units package
This commit is contained in:
+2
-2
@@ -32,11 +32,11 @@ class Point(Unit):
|
||||
|
||||
def draw(self):
|
||||
image = self.game.assets[f"BMP_BONUS_{self.value}"]
|
||||
image_size = self.game.engine.get_image_size(image)
|
||||
image_size = self.game.render_engine.get_image_size(image)
|
||||
self.rat_image = image
|
||||
partial_x, partial_y = 0, 0
|
||||
|
||||
x_pos = self.position_before[0] * self.game.cell_size + (self.game.cell_size - image_size[0]) // 2 + partial_x
|
||||
y_pos = self.position_before[1] * self.game.cell_size + (self.game.cell_size - image_size[1]) // 2 + partial_y
|
||||
|
||||
self.game.engine.draw_image(x_pos, y_pos, image, anchor="nw", tag="unit")
|
||||
self.game.render_engine.draw_image(x_pos, y_pos, image, anchor="nw", tag="unit")
|
||||
|
||||
Reference in New Issue
Block a user