Implemented ground mech boosting

This commit is contained in:
Anuken
2020-05-20 18:48:04 -04:00
parent 78f24b8840
commit 5b445c59c1
62 changed files with 610 additions and 638 deletions

View File

@@ -0,0 +1,33 @@
package mindustry.entities.comp;
import arc.graphics.*;
import arc.graphics.g2d.*;
import arc.math.*;
import mindustry.annotations.Annotations.*;
import mindustry.gen.*;
import mindustry.graphics.*;
@EntityDef(value = {Decalc.class}, pooled = true, serialize = false)
@Component
abstract class DecalComp implements Drawc, Timedc, Rotc, Posc{
@Import float x, y, rotation;
Color color = new Color(1, 1, 1, 1);
TextureRegion region;
@Override
public void draw(){
Draw.z(Layer.scorch);
Draw.color(color);
Draw.alpha(1f - Mathf.curve(fin(), 0.98f));
Draw.rect(region, x, y, rotation);
Draw.color();
}
@Replace
public float clipSize(){
return region.getWidth()*2;
}
}