dev-jakklu #5

Merged
s452701 merged 14 commits from dev-jakklu into master 2021-05-08 22:22:47 +02:00
Showing only changes of commit 99934067de - Show all commits

View File

@ -0,0 +1,18 @@
from survival.components.collision_component import CollisionComponent
from survival.components.inventory_component import InventoryComponent
from survival.components.position_component import PositionComponent
from survival.components.sprite_component import SpriteComponent
class BuildingGenerator:
def create_home(self, world, game_map):
home = world.create_entity()
pos = PositionComponent([32, 32], [32, 32])
world.add_component(home, pos)
world.add_component(home, InventoryComponent())
game_map.add_entity(home, pos)
sprite = SpriteComponent('stone.png')
sprite.set_scale(2)
world.add_component(home, sprite)
world.add_component(home, CollisionComponent())