Revenant
This commit is contained in:
@@ -1,9 +1,24 @@
|
||||
package mindustry.entities.comp;
|
||||
|
||||
import arc.math.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.type.*;
|
||||
|
||||
@Component
|
||||
abstract class TrailComp{
|
||||
abstract class TrailComp implements Unitc{
|
||||
@Import UnitType type;
|
||||
@Import float x, y, rotation;
|
||||
|
||||
transient Trail trail = new Trail();
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
float scale = elevation();
|
||||
float offset = type.engineOffset/2f + type.engineOffset/2f*scale;
|
||||
|
||||
float cx = x + Angles.trnsx(rotation + 180, offset), cy = y + Angles.trnsy(rotation + 180, offset);
|
||||
trail.update(cx, cy);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user