# Space shooter.
# This program is a fun game but also a good example of the scene2d module
-module shoot
+module shoot is
+ app_name("Space Shooter")
+ app_version(0, 1, git_revision)
+end
import mnit
import shoot_logic
end
end
return true
- else if input_event isa PointerEvent then
+ else if input_event isa PointerEvent and input_event.pressed then
var x = (input_event.x * app.scale).to_i
var y = (input_event.y * app.scale).to_i
player.goes_to(x, y, speed)
var img_boss_left: Image
var img_boss_right: Image
- redef fun window_created
+ redef fun on_create
do
super
if not self.scene.exists then quit = true
end
self.scene.draw_on_display(self)
-
- # Wait the next frame
- sys.nanosleep(0, 16000000)
end
var paused: Bool = false