Game Development Reference
In-Depth Information
//Sets fullscreen window
getWindow().requestFeature(Window.
FEATURE_NO_TITLE
);
getWindow().setFlags(WindowManager.LayoutParams.
FLAG_FULLSCREEN
,
WindowManager.LayoutParams.
FLAG_FULLSCREEN
);
//Suggests an audio stream whose volume can be changed
//by the hardware volume controls.
this
.setVolumeControlStream(AudioManager.
STREAM_MUSIC
);
//Retrieves display metrics that describe the size and
//density of this display.
DisplayMetrics dm =
new
DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
//Sets screen type(by default 800x640) and initial parameters to draw
setScreen
(dm.
widthPixels
,dm.
heightPixels
);
screenType
=
SCREEN_TYPE
;
//Loads system & welcome public resources.
BitmapManager.
loadSystemPublic
(getResources());
BitmapManager.
loadWelcomePublic
(getResources());
//Initializes sound pool
initSound();
//Starts off with the Menu View (also referred to as Welcome View)
wv
=
new
WelcomeView(RaccoonRob.
this
);
myHandler
.sendEmptyMessage(3);
//Log.d(TAG, String.format("Dungeon-----: %1$d",2));
}
@Override
protected void
onResume() {
super
.onResume();
// The activity has become visible (it is now "resumed").
}
@Override
Search WWH ::
Custom Search