Fixed HTML5 bug

This commit is contained in:
Anuken
2018-01-31 23:38:29 -05:00
parent 78faddbf89
commit c30b3d8c8c

View File

@@ -1,5 +1,6 @@
package io.anuke.mindustry.entities.enemies.types; package io.anuke.mindustry.entities.enemies.types;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.math.MathUtils;
import io.anuke.mindustry.entities.Bullet; import io.anuke.mindustry.entities.Bullet;
import io.anuke.mindustry.entities.BulletType; import io.anuke.mindustry.entities.BulletType;
@@ -22,7 +23,6 @@ public class HealerType extends EnemyType {
public HealerType() { public HealerType() {
super("healerenemy"); super("healerenemy");
speed = 0.25f; speed = 0.25f;
reload = 10; reload = 10;
health = 200; health = 200;
@@ -34,6 +34,7 @@ public class HealerType extends EnemyType {
mass = 1.1f; mass = 1.1f;
} }
@Override @Override
public void behavior(Enemy enemy){ public void behavior(Enemy enemy){
@@ -56,6 +57,7 @@ public class HealerType extends EnemyType {
} }
} }
@Override @Override
public void updateShooting(Enemy enemy){ public void updateShooting(Enemy enemy){
Enemy target = (Enemy)enemy.target; Enemy target = (Enemy)enemy.target;
@@ -74,14 +76,17 @@ public class HealerType extends EnemyType {
Angles.translation(enemy.angleTo(target), 5f); Angles.translation(enemy.angleTo(target), 5f);
Graphics.shader(); Shaders.outline.color.set(Color.CLEAR);
Shaders.outline.apply();
if(target.health < target.maxhealth){ if(target.health < target.maxhealth){
Draw.color(Hue.rgb(138, 244, 138, (MathUtils.sin(Timers.time()) + 1f) / 13f)); Draw.color(Hue.rgb(138, 244, 138, (MathUtils.sin(Timers.time()) + 1f) / 13f));
Draw.alpha(0.9f); Draw.alpha(0.9f);
Shapes.laser("laser", "laserend", enemy.x + Angles.x(), enemy.y + Angles.y(), target.x - Angles.x()/1.5f, target.y - Angles.y()/1.5f); Shapes.laser("laser", "laserend", enemy.x + Angles.x(), enemy.y + Angles.y(), target.x - Angles.x()/1.5f, target.y - Angles.y()/1.5f);
Draw.color(); Draw.color();
} }
Graphics.shader(Shaders.outline);
Graphics.flush();
} }
void explode(Enemy enemy){ void explode(Enemy enemy){