preloading

preloading

Run >
<!DOCTYPE html>
<html>
<head>
<script src="scripts/tbgs_min.js"></script>
<script src="scripts/ControllerPad.js"></script>
<link type="text/css" rel="stylesheet" href="styles/ControllerPad.css">
</head>
<body>
<div id="loader" style="position:absolute;left:200px;top:160px;height:8px;width:1px;background:#f8dfa6;border: thin solid #aaa399"></div>
<div id="container" style="position:absolute;width:480px;height:320px;margin:0%">
<div id="root" style="position:relative;width:480px;height:320px;"> </div>
<div id="controller" > </div>
</div>
<script 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);
};
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

new preloading()