development #12
@ -30,7 +30,7 @@ class WorldGenerator:
|
||||
def __init__(self, win, callback):
|
||||
self.win = win
|
||||
self.callback = callback
|
||||
self.world: World = esper.World()
|
||||
self.world: World = esper.World(timed=True)
|
||||
self.game_map: GameMap = GameMap(int(SCREEN_WIDTH / 32) * 2, 2 * int(SCREEN_HEIGHT / 32) + 1)
|
||||
self.camera = Camera(self.game_map.width * 32, self.game_map.height * 32, self.win)
|
||||
self.resource_generator: ResourceGenerator = ResourceGenerator(self.world, self.game_map)
|
||||
@ -84,7 +84,7 @@ class WorldGenerator:
|
||||
|
||||
if self.world.has_component(self.player, ConsumptionComponent):
|
||||
self.world.remove_component(self.player, ConsumptionComponent)
|
||||
self.world.add_component(self.player, ConsumptionComponent(inv.total_items_count()))
|
||||
self.world.add_component(self.player, ConsumptionComponent())
|
||||
|
||||
pos = self.world.component_for_entity(self.player, PositionComponent)
|
||||
old_pos = pos.grid_position
|
||||
|
Loading…
Reference in New Issue
Block a user