Run >
<!DOCTYPE html>
src="scripts/tbgs_min.js"
src="scripts/ControllerPad.js"
type="text/css" rel="stylesheet" href="styles/ControllerPad.css"
id="loader" style="position:absolute;left:200px;top:160px;height:8px;width:1px;background:#f8dfa6;border: thin solid #aaa399"
id="container" style="position:absolute;width:480px;height:320px;margin:0%"
id="root" style="position:relative;width:480px;height:320px;"
id="controller"
type="text/javascript"
(function() {
class PreloadingExample extends tabageos.GameSkeleton {
constructor() {
super();
var specs = {
gWidth:480, gHeight:320, positionResetSpecifics:null, startWidth:480,statHeight:320,startLocations:new tabageos.MoverPoint(0,0),
initPlayerPosition:new tabageos.MoverPoint(64,64), cameraFollowOffsetX:0, cameraType:1,
tileW:16, tileH:16, rootDivId:"root", cameraWidth:480, cameraHeight:320, gameScale:1, spriteSheetImage: "theSpriteSheet.png",
gameLoop:this.loop, initializationSpecifics:this.setup, controllerDivId:"controller", disableBackgroundAlpha:0,
preloadSounds:["coin","jump","impact","newFactory"],preloadMusic:["EpicBossBattle","PreparingForBattle.ogg","gameMusic"]
};
this.dontEstablishWorkers();
this.initialConstruction(specs);
}
setup() {
this.removeHUD();
this.startButton.innerHTML = "<h1> Game files ready </h1> <br> Click to see top corner of the sprite sheet and hear game music";
this.player = new tabageos.Traveler(0,0,16,16);
this.display.copyPixels(this._image,new tabageos.Rectangle(0,0,480,320),new tabageos.MoverPoint());
this.beforeStartGameLoop = function(e) {
this.playMusic(0,0,0,2);
};