development #11
@ -53,7 +53,7 @@ class ResourceGenerator:
|
||||
resource = world.component_for_entity(resource_ent, ResourceComponent)
|
||||
inventory = world.component_for_entity(player, InventoryComponent)
|
||||
answer = decision_tree.predict_answer(resource)
|
||||
print(answer)
|
||||
# print(answer)
|
||||
inventory.add_item(resource.resource_type, 1)
|
||||
game_map.remove_entity(pos.grid_position)
|
||||
world.delete_entity(resource_ent, immediate=True)
|
||||
|
@ -17,5 +17,4 @@ class ResourceCollectionSystem(esper.Processor):
|
||||
|
||||
if collect.action == Action.MOVE:
|
||||
self.world.remove_component(ent, CollectingResourceComponent)
|
||||
print("HERE")
|
||||
self.world.add_component(ent, MovingComponent())
|
||||
|
@ -21,7 +21,6 @@ class CollisionSystem(esper.Processor):
|
||||
|
||||
vector = Direction.get_vector(pos.direction)
|
||||
moving.target = tuple(map(operator.add, vector, pos.grid_position))
|
||||
print(moving.target)
|
||||
moving.direction_vector = vector
|
||||
if self.check_collision(moving.target):
|
||||
self.world.remove_component(ent, MovingComponent)
|
||||
|
@ -11,7 +11,6 @@ from survival.systems.input_system import PathfindingComponent
|
||||
class CollectingResourceComponent:
|
||||
def __init__(self, action):
|
||||
self.action = action
|
||||
print(action)
|
||||
|
||||
|
||||
class PathfindingMovementSystem(esper.Processor):
|
||||
|
@ -9,4 +9,3 @@ class TimeSystem(esper.Processor):
|
||||
if time.timer > 1000:
|
||||
time.add_time(1)
|
||||
time.timer = 0
|
||||
print(time)
|
||||
|
Loading…
Reference in New Issue
Block a user