If you think the Android project Hungry-Mouse listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
//Name: Assets.java
//Purpose: assign reference variables for all the assets,images sound and music
// loadingscreen.java will load all the assets for the game during the splash screen
/*fromwww.java2s.com*/package com.hungry.mouse.main;
import com.hungry.mouse.framework.Image;
import com.hungry.mouse.framework.Music;
import com.hungry.mouse.framework.Sound;
publicclass Assets {
//use static so there is no need to create object to access them
//also static is 15%-20% faster since there is no need of an object
//rectangle buttons
publicstatic Image menu_buttons;
//small buttons
publicstatic Image pause_button;
publicstatic Image sound_on_buttons,music_on_buttons,info_buttons,help,logo,play_buttons;
publicstatic Image about,help1,help2,help3,help4,arrow_buttons,control_buttons,gyroscope_buttons,level_buttons,level1_button,level2_button,level3_button;
publicstatic Image cheese_reward,bomb,bomb2,sign;
publicstatic Image menu, splash, background, character, character2, character3, Kamikazi, Kamikazi2, Kamikazi3, Kamikazi4, Kamikazi5;
publicstatic Image tiledirt, tilegrassTop, tilegrassBot, tilegrassLeft, tilegrassRight, characterJump, characterDown;
publicstatic Sound click,fire,jump,collision,gameover,passed,collect;
publicstatic Music theme;
publicstaticvoid load(SampleGame sampleGame) {
// TODO Auto-generated method stub
theme = sampleGame.getAudio().createMusic("menutheme.mp3");//get the asset
theme.setLooping(true);//repeat background music
theme.setVolume(0.80f);//volume set to 80%
theme.play();//play
}
}