Game Development Reference
In-Depth Information
// Laser Bar Energy
mLaserBarPaint.setARGB(255, 0, 255, 96);
mLaserBarPaint.setStyle(Paint.Style.FILL);
// Shield Bar Energy
mShieldBarPaint.setARGB(255, 0, 255, 255);
mShieldBarPaint.setStyle(Paint.Style.FILL);
ship = getImage(R.drawable.sb_ship);
bullet = getImage(R.drawable.sb_bullet);
fire = new Bitmap[fireframe];
// Load fire image sprites
int[] ids = new int[] { R.drawable.sb_fire0, R.drawable.sb_fire1 };
for (n = 0; n < fireframe; n++) {
fire[n] = getImage(ids[n]);
}
// Load meteor explosion sequence sprites
ids = new int[] { R.drawable.sb_boom0, R.drawable.sb_boom1,
R.drawable.sb_boom2, R.drawable.sb_boom3,
R.drawable.sb_boom4 };
boom = new Bitmap[bframes + 1];
for (n = 0; n <= bframes; n++) {
boom[n] = getImage(ids[n]);
}
// ...
// Meteor initialize
meteor = getImage(R.drawable.sb_meteor);
// ...
// Load Audio clips
try {
blast = getAudioClip(R.raw.sb_blast);
crash = getAudioClip(R.raw.sb_collisn);
kill = getAudioClip(R.raw.sb_mdestr);
} catch (Exception e) {
Tools.MessageBox(mContext, "Audio Error: " + e.toString());
}
initStars();
// ...
}
Search WWH ::




Custom Search