Cleanup
This commit is contained in:
25
core/src/mindustry/entities/def/DecalComp.java
Normal file
25
core/src/mindustry/entities/def/DecalComp.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package mindustry.entities.def;
|
||||
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
@Component
|
||||
abstract class DecalComp implements Drawc, Timedc, Rotc, Posc{
|
||||
Color color = new Color(1, 1, 1, 1);
|
||||
TextureRegion region;
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
Draw.color(color);
|
||||
Draw.rect(region, x(), y(), rotation());
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float clipSize(){
|
||||
return region.getWidth()*2;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user