You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
1.1 KiB
1 line
1.1 KiB
function selectWord(e,t){switch(LANG){case"fr":return t;default:return e}}function newGame(e){-1!==e.scene.getIndex("Game")&&e.scene.remove("Game"),e.scene.add("Game",new Game(e))}function chooseTarget(e,t){let a=2*WIDTH_MAP,n=[];return t.forEach(function(t){if(t!==e){let o=Math.hypot(t.x-e.x,t.y-e.y);a>=o&&(a>o&&(a=o,n=[]),n.push(t))}}),n.length>1?n[Math.floor(Math.random()*(n.length+1))]:n[0]}var listBonus=[],LANG=navigator.language.substr(0,2).toLowerCase(),SPEED_GAME=1;const MYSELF="myself",SHIELD_PER_SECOND=5,COLOR_ATTACK=16711680,COLOR_MOVE=255,COLOR_CONDITION=921102,WIDTH_WINDOW=$(document).width()-20,HEIGHT_WINDOW=$(document).height()-20,WIDTH_MAP=WIDTH_WINDOW<HEIGHT_WINDOW?.8*WIDTH_WINDOW:.8*HEIGHT_WINDOW,SPEED=2,LIFE=100,DAMAGE=40,SHIELD=100,RANGE=WIDTH_MAP/2,HEIGHT_BONUS=WIDTH_MAP/10,HEIGHT_DAMAGE=WIDTH_MAP/20,DURATION_DAMAGE=700,TIME_RELOAD=1e3;var config={type:Phaser.AUTO,width:WIDTH_WINDOW,height:HEIGHT_WINDOW,parent:"all",backgroundColor:"#35363A"};let father=new Phaser.Game(config);father.scene.add("LoadFile",new LoadFile(father,"Boot",new Boot(father))),father.scene.start("LoadFile"); |