From: Alexis Laferrière Date: Mon, 2 Jun 2014 18:47:01 +0000 (-0400) Subject: examples: update moles to use app.nit X-Git-Tag: v0.6.6~40^2~13 X-Git-Url: http://nitlanguage.org?hp=275e3efb38c94635e52c56ab1f3f740decbd2629 examples: update moles to use app.nit Signed-off-by: Alexis Laferrière --- diff --git a/examples/mnit_moles/src/moles.nit b/examples/mnit_moles/src/moles.nit index 194cad4..a0d783a 100644 --- a/examples/mnit_moles/src/moles.nit +++ b/examples/mnit_moles/src/moles.nit @@ -227,16 +227,13 @@ class Screen end end -class MyApp - super App +redef class App var screen: nullable Screen = null var target_dt = 20000000 - init do super - - redef fun init_window + redef fun window_created do super @@ -285,6 +282,3 @@ fun display_offset_x: Int do return (512.0*display_scale).to_i # Depends on the width of the holes fun display_offset_y: Int do return (800.0*display_scale).to_i - -var app = new MyApp -app.main_loop diff --git a/examples/mnit_moles/src/moles_android.nit b/examples/mnit_moles/src/moles_android.nit index 281a536..ecc8b6e 100644 --- a/examples/mnit_moles/src/moles_android.nit +++ b/examples/mnit_moles/src/moles_android.nit @@ -24,7 +24,7 @@ redef class Game redef fun rows do return 5 end -redef class MyApp +redef class App redef fun init_screen_and_game do # We use as a reference the Moto X