Permalink
Browse files

Another build

  • Loading branch information...
geoffb committed Feb 27, 2012
1 parent d90b58a commit f9a4a4376558ac43f92abcfe352c18f0724110fd
Binary file not shown.
@@ -77,7 +77,7 @@
b.setInterval(0,this.update,this),this.running=!0};c.stop=function(){if(this.running)clearInterval(this.interval),this.running=!1};c.togglePause=function(){var a=!1;return function(){if(!this.getPlayerObject().hasState(b.Object.states.DYING))this.paused?(this.paused=!1,b.sound.setMuted(a),b.sound.play("unpause"),b.sound.play(this.currentMusic)):(this.paused=!0,this.initOptions(),a=b.sound.isMuted(),b.sound.play("pause"),b.sound.stop(this.currentMusic))}}();c.addObject=function(a){this.objectIdSeed++;
var d="o"+this.objectIdSeed;a.id=d;this.objects[d]=a;return d};c.getBarColor=function(a,d){var b=d/a*100;return b>50?"rgb(98, 187, 70)":b>25?"rgb(246, 139, 31)":"rgb(238, 28, 36)"};c.spawnObject=function(a,d,i,e){for(var i=i||a.facing,d=b.makeObject(d,!0),c=a;c.ownerId!==null;)if(this.objects[c.ownerId])c=this.objects[c.ownerId];else break;if(e!==!1)d.ownerId=c.id,d.team=a.team;d.centerOn(a.boundingBox().center());d.setDirection(i);d.init();return this.addObject(d)};c.objectExists=function(a){return this.objects[a]};
c.getPlayerObject=function(){return this.objects[this.playerObjectId]};c.getObjectCountByType=function(a){var d=0,b;for(b in this.objects)this.objects[b].type===a&&d++;return d};c.isAlive=function(a){return this.objects[a]?(a=this.objects[a],a.alive&&a.wounds<a.hitPoints):!1};c.preloadComplete=function(){this.state="intro";this.logoAlpha=0;this.logoFade="in";this.logoFadeSpeed=0.5};c.init=function(){this.state="intro";this.canvases.display=b.makeCanvas("display",this.view.width,this.view.height);
-this.canvases.buffer=b.makeCanvas("buffer",this.view.width,this.view.height,!0);this.canvases.waveText=b.makeCanvas("waveText",this.view.width,this.view.height,!0);this.resize();b.on("resize",this.resize,window,this);this.mouse=new b.Mouse(this.canvases.display);b.on("contextmenu",function(a){b.stopEvent(a)},document.body,this);b.on("blur",function(){this.stop();if(!(this.state!="running"||this.wonGame))this.keyboard.keyStates={},this.paused||this.togglePause()},window,this);b.on("focus",function(){this.start()},
+this.canvases.buffer=b.makeCanvas("buffer",this.view.width,this.view.height,!0);this.canvases.waveText=b.makeCanvas("waveText",this.view.width,this.view.height,!0);this.resize();b.on("resize",this.resize,window,this);this.mouse=new b.Mouse(this.canvases.display);b.on("contextmenu",function(a){b.stopEvent(a)},document.body,this);b.on("blur",function(){if(!(this.state!="running"||this.wonGame))this.keyboard.keyStates={},this.paused||this.togglePause(),this.stop()},window,this);b.on("focus",function(){this.start()},
window,this);this.preloader=new b.ImageLoader;this.preloader.load({ui:"img/sheet_ui.png"+this.cacheBust()},this.preloadComplete,this);this.images=new b.ImageLoader;this.images.load({arena:"img/sheet_arena.png"+this.cacheBust(),characters:"img/sheet_characters.png"+this.cacheBust(),objects:"img/sheet_objects.png"+this.cacheBust(),beholder:"img/sheet_beholder.png"+this.cacheBust()},this.handleImagesLoaded,this);this.getData("high_score")===null&&this.putData("high_score",1E3);this.initSound()};c.initSound=
function(){b.sound.init(function(){var a=b.sound;a.create("normal_battle_music","sound/music/normal_battle",!0,20);a.create("final_battle_music","sound/music/final_battle",!0,20);a.create("victory","sound/music/victory",!0,20);a.create("move_pointer","sound/effects/move_pointer",!1,50);a.create("select_pointer","sound/effects/select_pointer",!1,50);a.create("pause","sound/effects/pause");a.create("unpause","sound/effects/unpause");a.create("code_entered","sound/effects/code_entered");a.create("gate_opens",
"sound/effects/gate_opens");a.create("gate_closes","sound/effects/gate_closes");a.create("spike_attack","sound/effects/spike_attacks");a.create("immunity","sound/effects/immunity",!1,25);a.create("coins","sound/effects/coins",!1,10);a.create("eat_food","sound/effects/eat_food",!1,30);a.create("pickup_weapon","sound/effects/pickup_weapon");a.create("weapon_wall","sound/effects/weapon_wall",!1,25);a.create("fire_attack","sound/effects/char_attacks_fire");a.create("hero_attacks","sound/effects/char_attacks");
View
@@ -92,7 +92,7 @@ <h1>Onslaught! Arena</h1>
(this.paused=!1,b.sound.setMuted(a),b.sound.play("unpause"),b.sound.play(this.currentMusic)):(this.paused=!0,this.initOptions(),a=b.sound.isMuted(),b.sound.play("pause"),b.sound.stop(this.currentMusic))}}();d.addObject=function(a){this.objectIdSeed++;var c="o"+this.objectIdSeed;a.id=c;this.objects[c]=a;return c};d.getBarColor=function(a,c){var b=c/a*100;return b>50?"rgb(98, 187, 70)":b>25?"rgb(246, 139, 31)":"rgb(238, 28, 36)"};d.spawnObject=function(a,c,h,e){for(var h=h||a.facing,c=b.makeObject(c,
!0),d=a;d.ownerId!==null;)if(this.objects[d.ownerId])d=this.objects[d.ownerId];else break;if(e!==!1)c.ownerId=d.id,c.team=a.team;c.centerOn(a.boundingBox().center());c.setDirection(h);c.init();return this.addObject(c)};d.objectExists=function(a){return this.objects[a]};d.getPlayerObject=function(){return this.objects[this.playerObjectId]};d.getObjectCountByType=function(a){var c=0,b;for(b in this.objects)this.objects[b].type===a&&c++;return c};d.isAlive=function(a){return this.objects[a]?(a=this.objects[a],
a.alive&&a.wounds<a.hitPoints):!1};d.preloadComplete=function(){this.state="intro";this.logoAlpha=0;this.logoFade="in";this.logoFadeSpeed=0.5};d.init=function(){this.state="intro";this.canvases.display=b.makeCanvas("display",this.view.width,this.view.height);this.canvases.buffer=b.makeCanvas("buffer",this.view.width,this.view.height,!0);this.canvases.waveText=b.makeCanvas("waveText",this.view.width,this.view.height,!0);this.resize();b.on("resize",this.resize,window,this);this.mouse=new b.Mouse(this.canvases.display);
-b.on("contextmenu",function(a){b.stopEvent(a)},document.body,this);b.on("blur",function(){this.stop();if(!(this.state!="running"||this.wonGame))this.keyboard.keyStates={},this.paused||this.togglePause()},window,this);b.on("focus",function(){this.start()},window,this);this.preloader=new b.ImageLoader;this.preloader.load({ui:"img/sheet_ui.png"+this.cacheBust()},this.preloadComplete,this);this.images=new b.ImageLoader;this.images.load({arena:"img/sheet_arena.png"+this.cacheBust(),characters:"img/sheet_characters.png"+
+b.on("contextmenu",function(a){b.stopEvent(a)},document.body,this);b.on("blur",function(){if(!(this.state!="running"||this.wonGame))this.keyboard.keyStates={},this.paused||this.togglePause(),this.stop()},window,this);b.on("focus",function(){this.start()},window,this);this.preloader=new b.ImageLoader;this.preloader.load({ui:"img/sheet_ui.png"+this.cacheBust()},this.preloadComplete,this);this.images=new b.ImageLoader;this.images.load({arena:"img/sheet_arena.png"+this.cacheBust(),characters:"img/sheet_characters.png"+
this.cacheBust(),objects:"img/sheet_objects.png"+this.cacheBust(),beholder:"img/sheet_beholder.png"+this.cacheBust()},this.handleImagesLoaded,this);this.getData("high_score")===null&&this.putData("high_score",1E3);this.initSound()};d.initSound=function(){b.sound.init(function(){var a=b.sound;a.create("normal_battle_music","sound/music/normal_battle",!0,20);a.create("final_battle_music","sound/music/final_battle",!0,20);a.create("victory","sound/music/victory",!0,20);a.create("move_pointer","sound/effects/move_pointer",
!1,50);a.create("select_pointer","sound/effects/select_pointer",!1,50);a.create("pause","sound/effects/pause");a.create("unpause","sound/effects/unpause");a.create("code_entered","sound/effects/code_entered");a.create("gate_opens","sound/effects/gate_opens");a.create("gate_closes","sound/effects/gate_closes");a.create("spike_attack","sound/effects/spike_attacks");a.create("immunity","sound/effects/immunity",!1,25);a.create("coins","sound/effects/coins",!1,10);a.create("eat_food","sound/effects/eat_food",
!1,30);a.create("pickup_weapon","sound/effects/pickup_weapon");a.create("weapon_wall","sound/effects/weapon_wall",!1,25);a.create("fire_attack","sound/effects/char_attacks_fire");a.create("hero_attacks","sound/effects/char_attacks");a.create("hero_damage","sound/effects/char_damage_3");a.create("hero_dies","sound/effects/char_dies");a.create("bat_damage","sound/effects/bat_damage");a.create("bat_dies","sound/effects/bat_dies");a.create("goblin_attacks","sound/effects/goblin_attacks");a.create("goblin_damage",
View
@@ -111,7 +111,7 @@ <h1>Onslaught! Arena</h1>
b.setInterval(0,this.update,this),this.running=!0};c.stop=function(){if(this.running)clearInterval(this.interval),this.running=!1};c.togglePause=function(){var a=!1;return function(){if(!this.getPlayerObject().hasState(b.Object.states.DYING))this.paused?(this.paused=!1,b.sound.setMuted(a),b.sound.play("unpause"),b.sound.play(this.currentMusic)):(this.paused=!0,this.initOptions(),a=b.sound.isMuted(),b.sound.play("pause"),b.sound.stop(this.currentMusic))}}();c.addObject=function(a){this.objectIdSeed++;
var d="o"+this.objectIdSeed;a.id=d;this.objects[d]=a;return d};c.getBarColor=function(a,d){var b=d/a*100;return b>50?"rgb(98, 187, 70)":b>25?"rgb(246, 139, 31)":"rgb(238, 28, 36)"};c.spawnObject=function(a,d,i,e){for(var i=i||a.facing,d=b.makeObject(d,!0),c=a;c.ownerId!==null;)if(this.objects[c.ownerId])c=this.objects[c.ownerId];else break;if(e!==!1)d.ownerId=c.id,d.team=a.team;d.centerOn(a.boundingBox().center());d.setDirection(i);d.init();return this.addObject(d)};c.objectExists=function(a){return this.objects[a]};
c.getPlayerObject=function(){return this.objects[this.playerObjectId]};c.getObjectCountByType=function(a){var d=0,b;for(b in this.objects)this.objects[b].type===a&&d++;return d};c.isAlive=function(a){return this.objects[a]?(a=this.objects[a],a.alive&&a.wounds<a.hitPoints):!1};c.preloadComplete=function(){this.state="intro";this.logoAlpha=0;this.logoFade="in";this.logoFadeSpeed=0.5};c.init=function(){this.state="intro";this.canvases.display=b.makeCanvas("display",this.view.width,this.view.height);
-this.canvases.buffer=b.makeCanvas("buffer",this.view.width,this.view.height,!0);this.canvases.waveText=b.makeCanvas("waveText",this.view.width,this.view.height,!0);this.resize();b.on("resize",this.resize,window,this);this.mouse=new b.Mouse(this.canvases.display);b.on("contextmenu",function(a){b.stopEvent(a)},document.body,this);b.on("blur",function(){this.stop();if(!(this.state!="running"||this.wonGame))this.keyboard.keyStates={},this.paused||this.togglePause()},window,this);b.on("focus",function(){this.start()},
+this.canvases.buffer=b.makeCanvas("buffer",this.view.width,this.view.height,!0);this.canvases.waveText=b.makeCanvas("waveText",this.view.width,this.view.height,!0);this.resize();b.on("resize",this.resize,window,this);this.mouse=new b.Mouse(this.canvases.display);b.on("contextmenu",function(a){b.stopEvent(a)},document.body,this);b.on("blur",function(){if(!(this.state!="running"||this.wonGame))this.keyboard.keyStates={},this.paused||this.togglePause(),this.stop()},window,this);b.on("focus",function(){this.start()},
window,this);this.preloader=new b.ImageLoader;this.preloader.load({ui:"img/sheet_ui.png"+this.cacheBust()},this.preloadComplete,this);this.images=new b.ImageLoader;this.images.load({arena:"img/sheet_arena.png"+this.cacheBust(),characters:"img/sheet_characters.png"+this.cacheBust(),objects:"img/sheet_objects.png"+this.cacheBust(),beholder:"img/sheet_beholder.png"+this.cacheBust()},this.handleImagesLoaded,this);this.getData("high_score")===null&&this.putData("high_score",1E3);this.initSound()};c.initSound=
function(){b.sound.init(function(){var a=b.sound;a.create("normal_battle_music","sound/music/normal_battle",!0,20);a.create("final_battle_music","sound/music/final_battle",!0,20);a.create("victory","sound/music/victory",!0,20);a.create("move_pointer","sound/effects/move_pointer",!1,50);a.create("select_pointer","sound/effects/select_pointer",!1,50);a.create("pause","sound/effects/pause");a.create("unpause","sound/effects/unpause");a.create("code_entered","sound/effects/code_entered");a.create("gate_opens",
"sound/effects/gate_opens");a.create("gate_closes","sound/effects/gate_closes");a.create("spike_attack","sound/effects/spike_attacks");a.create("immunity","sound/effects/immunity",!1,25);a.create("coins","sound/effects/coins",!1,10);a.create("eat_food","sound/effects/eat_food",!1,30);a.create("pickup_weapon","sound/effects/pickup_weapon");a.create("weapon_wall","sound/effects/weapon_wall",!1,25);a.create("fire_attack","sound/effects/char_attacks_fire");a.create("hero_attacks","sound/effects/char_attacks");

0 comments on commit f9a4a43

Please sign in to comment.