Refactor event bus to use non-retrievable events;
update collision handling and add new inventory initialization; add torch lighting in fog shader;
This commit is contained in:
+5
-1
@@ -6,9 +6,13 @@ class Maze
|
||||
@spritesheet = Gosu::Image.load_tiles("assets/images/walls.png", 20, 40, retro: true)
|
||||
puts @spritesheet.size
|
||||
|
||||
$bus.on_retrievable(:maze_solve) do |x1, y1, x2, y2|
|
||||
$bus.on(:maze_solve) do |x1, y1, x2, y2|
|
||||
next @maze.solve(x1, y1, x2, y2)
|
||||
end
|
||||
|
||||
$bus.on(:collides?) do |rect|
|
||||
next collides?(rect) ? :wall : nil
|
||||
end
|
||||
end
|
||||
|
||||
def collides?(rect)
|
||||
|
||||
Reference in New Issue
Block a user