Fixed save crash

This commit is contained in:
Anuken
2017-09-25 19:48:24 -04:00
parent 9f3d7be7b4
commit ce75be6204
10 changed files with 36 additions and 14 deletions
@@ -161,7 +161,6 @@ public class Enemy extends DestructibleEntity{
@Override
public void draw(){
Draw.color();
String region = ClassReflection.getSimpleName(getClass()).toLowerCase() + "-t" + Mathf.clamp(tier, 1, 3);
@@ -170,6 +169,7 @@ public class Enemy extends DestructibleEntity{
Draw.getShader(Outline.class).region = Draw.region(region);
Draw.shader(Outline.class);
Draw.color();
Draw.rect(region, x, y, direction.angle()-90);
Draw.shader();
}
@@ -14,12 +14,13 @@ public class TankEnemy extends Enemy{
speed = 0.2f;
reload = 90f;
bullet = BulletType.small;
length = 3f;
}
void shoot(){
vector.set(length, 0).rotate(direction.angle());
Angles.shotgun(3, 4f, direction.angle(), f->{
Angles.shotgun(3, 8f, direction.angle(), f->{
Bullet out = new Bullet(bullet, this, x+vector.x, y+vector.y, f).add();
out.damage = (int)(damage*Vars.multiplier);
});