core :: union_find
union–find algorithm using an efficient disjoint-set data structuregamnit :: camera_control_android
Two fingers camera manipulation, pinch to zoom and slide to scroll
# Android services and implementation of app.nit for gamnit and mnit
module game
import platform
import native_app_glue
import dalvik
private import log
private import assets
redef class App
redef fun init_window
do
super
on_create
on_restore_state
end
redef fun term_window
do
super
on_stop
end
# Is the application currently paused?
var paused = true
redef fun pause
do
paused = true
on_pause
super
end
redef fun resume
do
paused = false
on_resume
super
end
redef fun save_state do on_save_state
redef fun lost_focus
do
paused = true
super
end
redef fun gained_focus
do
paused = false
super
end
end
lib/android/game.nit:15,1--68,3