Cleanup
This commit is contained in:
@@ -6,6 +6,7 @@ import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.util.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
@@ -38,19 +39,15 @@ public class Effects{
|
||||
Rect pos = Tmp.r2.setSize(effect.size).setCenter(x, y);
|
||||
|
||||
if(view.overlaps(pos)){
|
||||
//TODO implement create() method here.
|
||||
//EffectEntity entity = Pools.obtain(EffectEntity.class, EffectEntity::new);
|
||||
//entity.effect = effect;
|
||||
//entity.color.set(color);
|
||||
//entity.rotation = rotation;
|
||||
//entity.data = data;
|
||||
//entity.id++;
|
||||
//entity.set(x, y);
|
||||
//if(data instanceof Entity){
|
||||
// entity.setParent((Entity)data);
|
||||
//}
|
||||
//TODO ground effect
|
||||
//effectGroup.add(entity);
|
||||
EffectEntity entity = EffectEntity.create();
|
||||
entity.effect(effect);
|
||||
entity.rotation(rotation);
|
||||
entity.data(data);
|
||||
entity.id(EntityGroup.nextId());
|
||||
entity.set(x, y);
|
||||
entity.color().set(color);
|
||||
if(data instanceof Posc) entity.parent((Posc)data);
|
||||
entity.add();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ class AllEntities{
|
||||
@EntityDef(value = {Tilec.class}, isFinal = false)
|
||||
class TileDef{}
|
||||
|
||||
@EntityDef(value = {Effectc.class}, pooled = true)
|
||||
@EntityDef(value = {Effectc.class, Childc.class}, pooled = true)
|
||||
class EffectDef{}
|
||||
|
||||
@EntityDef({Decalc.class})
|
||||
|
||||
@@ -8,8 +8,8 @@ import mindustry.gen.*;
|
||||
abstract class ChildComp implements Posc{
|
||||
transient float x, y;
|
||||
|
||||
private @Nullable Posc parent;
|
||||
private float offsetX, offsetY;
|
||||
@Nullable Posc parent;
|
||||
float offsetX, offsetY;
|
||||
|
||||
@Override
|
||||
public void add(){
|
||||
|
||||
@@ -78,11 +78,6 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc{
|
||||
}
|
||||
|
||||
public Unitc unit(){
|
||||
if(dead()){
|
||||
//TODO remove
|
||||
Log.err("WARNING: DEAD PLAYER UNIT ACCESSED");
|
||||
new RuntimeException().printStackTrace();
|
||||
}
|
||||
return unit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user