asteronits, action_nitro & model_view: add makefile rules for iOS
[nit.git] / contrib / asteronits / src / asteronits.nit
index 006d1e1..628fc69 100644 (file)
@@ -26,7 +26,6 @@ import gamnit::flat
 
 import game_logic
 import spritesheet
-import app::audio
 
 redef class Spritesheet
        # Largest meteors, organized by color
@@ -61,16 +60,18 @@ redef class App
        var world = new World(12, 2, display.aspect_ratio) is lazy
 
        # Sound effects
-       private var fx_fire = new Sound("sounds/fire.mp3")
+       private var fx_fire = new Sound("sounds/fire.ogg")
        private var fx_explosion_ship = new Sound("sounds/explosion_ship.wav")
        private var fx_explosion_asteroids = new Sound("sounds/explosion_asteroids.wav")
 
-       redef fun on_create
+       redef fun create_scene
        do
                super
 
                # Move the camera to show all the world world in the screen range
                world_camera.reset_height(world.half_height * 2.0)
+
+               ui_camera.reset_height 720.0
        end
 
        # Main spritesheet with ships, asteroids and beams
@@ -90,6 +91,8 @@ redef class App
 
        redef fun accept_event(event)
        do
+               if super then return true
+
                if event isa QuitEvent then
                        exit 0
                else if event isa KeyEvent then