OwlCyberSecurity - MANAGER
Edit File: preload.js
var preload = function(game) { var LoadingText; } preload.prototype = { preload: function() {//add the background image and Logo for the loading screen this.stage.backgroundColor = "FFFFFF"; Background = this.add.image(0,0,"bg"); Logo = this.add.sprite(this.world.centerX,this.world.centerY,"logo"); Logo.anchor.setTo(0.5,0.5); Logo.scale.setTo(1.3,1.3); //this.load.image("ref","ref/2.png"); //audio //this.load.audio("backgroundmusic","audio/sound1.mp3"); /*we call the FileComplete function to track if all assets that we want to load are finished loading*/ this.load.onFileComplete.add(this.FileComplete,this); //Load all the images and audio that will be used in the game this.load.image("body","img/body.png"); this.load.image("underware","img/underwear.png"); this.load.image("cover","img/cover.png"); this.load.image("hit_area","img/hit_area.png"); //icons this.load.atlasJSONHash("bottoms_icon","img/icons/bottoms_icon.png","img/icons/bottoms_icon.json"); this.load.atlasJSONHash("hair_icon","img/icons/hair_icon.png","img/icons/hair_icon.json"); this.load.atlasJSONHash("suit_icon","img/icons/suit_icon.png","img/icons/suit_icon.json"); this.load.atlasJSONHash("tops_icon","img/icons/tops_icon.png","img/icons/tops_icon.json"); this.load.image("extra_icon","img/icons/extra_icon.png"); this.load.image("extra_icon2","img/icons/extra_icon2.png"); this.load.image("extra_icon3","img/icons/extra_icon3.png"); this.load.image("extra_icon4","img/icons/extra_icon4.png"); this.load.image("extra_icon5","img/icons/extra_icon5.png"); //items this.load.atlasJSONHash("bottoms","img/items/bottoms.png","img/items/bottoms.json"); this.load.atlasJSONHash("hair","img/items/hair.png","img/items/hair.json"); this.load.atlasJSONHash("suit","img/items/suit.png","img/items/suit.json"); this.load.atlasJSONHash("tops","img/items/tops.png","img/items/tops.json"); this.load.image("suit_back","img/items/suit_back.png"); this.load.image("extra","img/items/extra.png"); this.load.image("extra2","img/items/extra2.png"); this.load.image("extra3","img/items/extra3.png"); this.load.image("extra4","img/items/extra4.png"); this.load.image("extra5","img/items/extra5.png"); //load buttons this.load.atlas("play_btn","img/buttons/play_btn.png","img/buttons/play_btn.json"); this.load.atlas("save_btn","img/buttons/save_btn.png","img/buttons/save_btn.json"); //loading percentage LoadingText = this.add.text(this.world.centerX,this.world.centerY+220,"0%",{font: "bold 100px Arial",fill: "#FFFFFF"}); LoadingText.anchor.setTo(0.5,0.5); LoadingText.setShadow(3,3,"rgba(0,0,0,0.5)",2); //this.stage.backgroundColor = "FF0000"; }, FileComplete: function(progress) { LoadingText.text = progress + "%"; if(progress == 100) { this.state.start("TitleScreen"); } }, update: function() { /*if(this.cache.isSoundDecoded("backgroundmusic")); { this.state.start("TitleScreen"); }*/ } }