cleanup
This commit is contained in:
+3
-3
@@ -15,9 +15,9 @@ rect.on_click do
|
|||||||
0xFF0000
|
0xFF0000
|
||||||
end
|
end
|
||||||
|
|
||||||
main_scene.add_element text
|
main_scene << text
|
||||||
main_scene.add_element rect
|
main_scene << rect
|
||||||
|
|
||||||
window.add_scene :main_scene, main_scene
|
window.scenes[:main_scene] = main_scene
|
||||||
|
|
||||||
window.start :main_scene
|
window.start :main_scene
|
||||||
|
|||||||
+4
-3
@@ -25,7 +25,7 @@ start_button.on_click do
|
|||||||
window.start :game_scene
|
window.start :game_scene
|
||||||
end
|
end
|
||||||
|
|
||||||
menu_scene.add_element start_button
|
menu_scene << start_button
|
||||||
|
|
||||||
game_scene = Scene.new
|
game_scene = Scene.new
|
||||||
|
|
||||||
@@ -96,6 +96,7 @@ end
|
|||||||
# match is set to list of all capturing queries
|
# match is set to list of all capturing queries
|
||||||
# for components returns an object that responds to .each with every ceomponents values
|
# for components returns an object that responds to .each with every ceomponents values
|
||||||
# for entities it does similarly
|
# for entities it does similarly
|
||||||
|
# mouse state can be read in systems always
|
||||||
|
|
||||||
query = tag(:enemy) & component(:health, true) & anti(name("Trap Preview", true))
|
query = tag(:enemy) & component(:health, true) & anti(name("Trap Preview", true))
|
||||||
# in the match name will return just the one entity
|
# in the match name will return just the one entity
|
||||||
@@ -182,7 +183,7 @@ world.shader :fog do |shader|
|
|||||||
z = 100 # shaders always appear above normal sprites but z is used to sort them relative to each other, so a shader with z 100 will appear above a shader with z 50, but both will appear above normal sprites
|
z = 100 # shaders always appear above normal sprites but z is used to sort them relative to each other, so a shader with z 100 will appear above a shader with z 50, but both will appear above normal sprites
|
||||||
end
|
end
|
||||||
|
|
||||||
window.add_scene :menu_scene, menu_scene
|
window.scenes[:menu_scene] = menu_scene
|
||||||
window.add_scene :game_scene, game_scene
|
window.scenes[:game_scene] = game_scene
|
||||||
|
|
||||||
window.start :menu_scene # first scene to show when the game starts, stops the loading bg
|
window.start :menu_scene # first scene to show when the game starts, stops the loading bg
|
||||||
|
|||||||
Reference in New Issue
Block a user