mirror of
https://github.com/simon987/Much-Assembly-Required-Frontend.git
synced 2025-04-10 14:26:44 +00:00
5 lines
1.5 KiB
JavaScript
5 lines
1.5 KiB
JavaScript
var RENDERER_WIDTH=document.getElementById("game").clientWidth*window.devicePixelRatio,RENDERER_HEIGHT=window.innerHeight/1.4*window.devicePixelRatio,DEBUG=!0,config={tileTint:16777215,wallTint:14540253,oreTint:15987699,worldSize:16,cubotHoverTint:65280,cubotTint:16777215,textFill:"#FFFFFF",textStroke:"#9298a8",biomassTint:6535263,biomassHoverTint:65280,tileHoverTint:65280,itemIron:4408129,textIron:"#434341",itemCopper:13139256,textCopper:"#C87D38",hologramFill:"#0aced6",hologramStroke:"#12FFB0",
|
|
copperFill:"#C87D38",plainSprite:"tiles/tile",wallSprite:"tiles/bigTile",walkDuration:800,holoStyle:function(a){return{fontSize:32,fill:a?a:config.hologramFill,stroke:config.hologramStroke,strokeThickness:1,font:"fixedsys"}},kbBufferX:225,kbBufferY:20,arrowTextStyle:{fontSize:32,fill:"#ffffff",stroke:"#9298a8",strokeThickness:1,font:"fixedsys"},lowEnergy:100,lowEnergyTint:13369344,bigMessageFill:"#ff803d",arrowTint:16777215,arrowHoverTint:65280,selfUsernameColor:16469258,otherCubotAlpha:.6,defaultWorldSize:16},
|
|
TileType;(function(a){a[a.PLAIN=0]="PLAIN";a[a.WALL=1]="WALL";a[a.IRON=2]="IRON";a[a.COPPER=3]="COPPER"})(TileType||(TileType={}));
|
|
var Util=function(){function a(){}a.getIsoY=function(b){return a.getIsoX(b)};a.getIsoX=function(a){return 71.5*a};a.getDeltaX=function(a){switch(a){case Direction.NORTH:case Direction.SOUTH:return 0;case Direction.EAST:return 1;case Direction.WEST:return-1}};a.getDeltaY=function(a){switch(a){case Direction.EAST:case Direction.WEST:return 0;case Direction.NORTH:return 1;case Direction.SOUTH:return-1}};return a}(),mar=new MarGame;
|