Game Development Reference
In-Depth Information
public void startGame(){
initRot(); //Initializes the menu rotation parameters
kt.isGameOn = true ;
if (!kt.isAlive()){ //Key thread
kt.start();
}
hero.startAnimation(); //starts hero animation
for (Monster m:monsterArray){
m.startAnimation();
//starts monster animation
}
aigot.isGameOn = true ;
if (! aigot.isAlive()){ //AI thread
aigot.start();
}
father.playMedia();
}
public void pauseGame(){
father.saveInfo(); //Saves user information
father.pauseMedia(); //Pauses sounds
kt.isGameOn = false ;
hero.pauseAnimation();
for (Monster m:monsterArray){
m.pauseAnimation();
}
aigot.isGameOn = false ;
}
Search WWH ::




Custom Search