Fixed HTML building

This commit is contained in:
Anuken
2017-05-03 13:08:02 -04:00
parent ccdd23fe6c
commit 6a453ce84b
8 changed files with 10 additions and 12 deletions

BIN
core/lib/ucore.jar Normal file

Binary file not shown.

View File

@@ -5,7 +5,6 @@ import static io.anuke.mindustry.Vars.*;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.Input.Keys;
import io.anuke.gif.GifRecorder;
import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.Player;
import io.anuke.mindustry.world.Generator; import io.anuke.mindustry.world.Generator;
import io.anuke.mindustry.world.blocks.ProductionBlocks; import io.anuke.mindustry.world.blocks.ProductionBlocks;
@@ -17,7 +16,7 @@ import io.anuke.ucore.util.Timers;
public class Control extends RendererModule{ public class Control extends RendererModule{
public int rangex = 10, rangey = 10; public int rangex = 10, rangey = 10;
GifRecorder recoder = new GifRecorder(batch); //GifRecorder recoder = new GifRecorder(batch);
public Control(){ public Control(){
cameraScale = 4f; cameraScale = 4f;
@@ -113,7 +112,7 @@ public class Control extends RendererModule{
Renderer.renderOverlay(); Renderer.renderOverlay();
batch.end(); batch.end();
recoder.update(); //recoder.update();
} }
if(!paused){ if(!paused){

View File

@@ -126,7 +126,7 @@ public class Renderer{
if(recipe == null && !ui.hasMouse()){ if(recipe == null && !ui.hasMouse()){
Tile tile = World.cursorTile(); Tile tile = World.cursorTile();
if(tile.block() != Blocks.air){ if(tile != null && tile.block() != Blocks.air){
if(tile.entity != null) if(tile.entity != null)
drawHealth(tile.entity.x, tile.entity.y, tile.entity.health, tile.entity.maxhealth); drawHealth(tile.entity.x, tile.entity.y, tile.entity.health, tile.entity.maxhealth);

View File

@@ -18,7 +18,7 @@ public class Vars{
public static final float wavespace = 20*60; public static final float wavespace = 20*60;
public static final float enemyspawnspace = 65; public static final float enemyspawnspace = 65;
public static final float breakduration = 40; public static final float breakduration = 40;
public static boolean debug = true; public static boolean debug = false;
public static final Vector2 vector = new Vector2(); public static final Vector2 vector = new Vector2();

View File

@@ -23,7 +23,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
Draw.clear(); Draw.clear();
} }
}, },
sniper = new BulletType(3f, 17){ sniper = new BulletType(3f, 20){
public void draw(Bullet b){ public void draw(Bullet b){
Draw.color("lightgray"); Draw.color("lightgray");
Draw.rect("bullet", b.x, b.y, b.angle()); Draw.rect("bullet", b.x, b.y, b.angle());

View File

@@ -77,13 +77,13 @@ public class WeaponBlocks{
reload = 5f; reload = 5f;
bullet = BulletType.flame; bullet = BulletType.flame;
ammo = Item.coal; ammo = Item.coal;
health = 85; health = 90;
} }
}, },
sniperturret = new Turret("sniperturret"){ sniperturret = new Turret("sniperturret"){
{ {
range = 100; range = 120;
reload = 60f; reload = 60f;
bullet = BulletType.sniper; bullet = BulletType.sniper;
ammo = Item.steel; ammo = Item.steel;

View File

@@ -2,7 +2,7 @@
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd"> <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module rename-to="html"> <module rename-to="html">
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' /> <inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='com.badlogic.gdx.physics.box2d.box2d-gwt' /> <inherits name='com.badlogic.gdx.ai' />
<inherits name='Mindustry' /> <inherits name='Mindustry' />
<inherits name='uCore' /> <inherits name='uCore' />

View File

@@ -8,11 +8,10 @@
<script src="soundmanager2-jsmin.js"></script> <script src="soundmanager2-jsmin.js"></script>
</head> </head>
<body onkeydown="preventUseOfDefaultKeys(event);"> <body onkeydown="preventUseOfDefaultKeys(event);" oncontextmenu="return false;">
<div align="center" id="embed-html"></div> <div align="center" id="embed-html"></div>
<script type="text/javascript" src="html/html.nocache.js"></script> <script type="text/javascript" src="html/html.nocache.js"></script>
</body> </body>
<script> <script>
function handleMouseDown(evt) { function handleMouseDown(evt) {
evt.preventDefault(); evt.preventDefault();