Class ID mapping
This commit is contained in:
@@ -3,8 +3,6 @@ package mindustry.entities;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.util.*;
|
||||
import mindustry.entities.traits.*;
|
||||
|
||||
/**
|
||||
* Class for predicting shoot angles based on velocities of targets.
|
||||
*/
|
||||
|
||||
@@ -55,7 +55,7 @@ public class EntityComps{
|
||||
@Override
|
||||
public void controller(UnitController controller){
|
||||
this.controller = controller;
|
||||
controller.set(this);
|
||||
controller.unit(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1291,7 +1291,7 @@ public class EntityComps{
|
||||
}
|
||||
|
||||
@Component
|
||||
abstract class ShielderComp implements Damagec{
|
||||
abstract class ShielderComp implements Damagec, Teamc, Posc{
|
||||
|
||||
void absorb(){
|
||||
|
||||
@@ -1536,7 +1536,7 @@ public class EntityComps{
|
||||
|
||||
@Component
|
||||
@BaseComponent
|
||||
class EntityComp{
|
||||
abstract class EntityComp{
|
||||
private boolean added;
|
||||
int id;
|
||||
|
||||
@@ -1563,5 +1563,8 @@ public class EntityComps{
|
||||
<T> T as(Class<T> type){
|
||||
return (T)this;
|
||||
}
|
||||
|
||||
@InternalImpl
|
||||
abstract int classId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import arc.util.pooling.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.traits.*;
|
||||
import mindustry.entities.type.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
@@ -17,7 +17,6 @@ import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.ctype.ContentType;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.traits.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
@@ -5,7 +5,6 @@ import arc.math.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.traits.*;
|
||||
import mindustry.entities.type.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.game.EventType.*;
|
||||
|
||||
@@ -3,10 +3,7 @@ package mindustry.entities.units;
|
||||
import mindustry.gen.*;
|
||||
|
||||
//TODO rename
|
||||
public abstract class UnitController{
|
||||
protected Unitc unit;
|
||||
|
||||
public void set(Unitc unit){
|
||||
this.unit = unit;
|
||||
}
|
||||
public interface UnitController{
|
||||
void unit(Unitc unit);
|
||||
Unitc unit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user