Fixed some minor bugs

This commit is contained in:
Anuken
2017-10-02 17:14:32 -04:00
parent 77f574e974
commit 3e9aca023a
10 changed files with 18 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ package io.anuke.mindustry.entities;
import static io.anuke.mindustry.Vars.*;
import com.badlogic.gdx.Input.Buttons;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector2;
@@ -51,7 +52,7 @@ public class Player extends DestructibleEntity{
float speed = this.speed;
if(Vars.debug)
if(Vars.debug && Inputs.keyDown(Keys.SHIFT_LEFT))
speed *= 3f;
if(health < maxhealth && Timers.get(this, 50))

View File

@@ -108,10 +108,9 @@ public class Enemy extends DestructibleEntity{
int x2 = path[node].x, y2 = path[node].y;
if(World.raycast(Mathf.scl2(x, Vars.tilesize), Mathf.scl2(y, Vars.tilesize), x2, y2) != null){
Timers.run(Mathf.random(10f), ()->{
Timers.run(Mathf.random(15f), ()->{
set(x2 * Vars.tilesize, y2 * Vars.tilesize);
});
}
}
@@ -173,7 +172,7 @@ public class Enemy extends DestructibleEntity{
String region = ClassReflection.getSimpleName(getClass()).toLowerCase() + "-t" + Mathf.clamp(tier, 1, 3);
//TODO is this necessary?
//TODO is this really necessary?
Draw.getShader(Outline.class).color.set(tierColors[tier-1]);
Draw.getShader(Outline.class).region = Draw.region(region);