Game Development Reference
In-Depth Information
gv.father.playSound(OVER_SOUND, 0);
if
(gv.score>gv.father.best) {
gv.father.best = gv.score;
gv.setGameState(STATE_SUBMIT);
}
else
gv.setGameState(STATE_OVER);
gv.pauseGame();
}
break
;
}
try
{
Thread.sleep(MONSTER_GO_SLEEP_SPAN);
}
catch
(Exception e){
e.printStackTrace();
}
}
x = dx;
//Updates x,y coordinates
y = dy;
isLocked =
false
;
//unlocked, starts alert mode
}
}.start();
}
Bitmap Sheet
The images of all monsters are stored in a Bitmap sheet, which contains 4 x 4 subsets
(frames) with identical sizes (w x h = 90 x 120) as shown in figure 3.3. We'll talk about
how to cut the frames out for animations further down.
Search WWH ::
Custom Search