# This file is part of NIT ( http://www.nitlanguage.org ).
#
-# Copyright 2012-2013 Alexis Laferrière <alexis.laf@xymus.net>
+# Copyright 2012-2014 Alexis Laferrière <alexis.laf@xymus.net>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# See the License for the specific language governing permissions and
# limitations under the License.
-module dino_android
+module dino_android is
+ java_package("org.nitlanguage.dino")
+end
import dino
import mnit_android
+import android::portrait
+import android::vibration
redef class ImageSet
redef fun start_over_path do return "images/play_again_mobile.png"
redef fun top_offset do return 92
end
-super
+redef class Dino
+ # When hit, vibrate
+ redef fun hit(hitter, dmg)
+ do
+ app.vibrator.vibrate 25
+ super
+ end
+end
+
+redef class Caveman
+ # When crushed, vibrate a little
+ redef fun die(turn)
+ do
+ app.vibrator.vibrate 10
+ super
+ end
+end