diff options
Diffstat (limited to 'main.rhm')
-rw-r--r-- | main.rhm | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -23,7 +23,7 @@ wrld.entities.add(entity) reset_entity(entity) test(entity.move(1, 0), "move horizontal") -reset_entity(entity) +reset_entity(entity, 1, 1) test(entity.move(0, 1), "move vertical") reset_entity(entity) @@ -41,7 +41,11 @@ reset_entity(entity, 63, 0) test(entity.move(64, 0), "cross chunk") test(entity.current_chunk == new_chunk, "changed chunk") -//world.entities -println(@str{Entity is @(entity.x) @(entity.y)}) - +entity.current_chunk := chunk +reset_entity(entity, 0, 1) +entity.current_chunk.set_tile(0, 1, world.Tile(#'wall_north)) +test(!entity.move(0, 0), "Blocked by wall") +test(entity.move(1,1), "Move by wall") +//world.entities +//println(@str{Entity is @(entity.x) @(entity.y)}) |