Cleanup, optimization

This commit is contained in:
Anuken
2020-05-01 16:35:18 -04:00
parent 3101fc8056
commit 135b87fdb2
20 changed files with 138 additions and 154 deletions

View File

@@ -1,10 +1,13 @@
package mindustry.entities.def;
import arc.func.*;
import arc.graphics.g2d.*;
import arc.math.*;
import arc.math.geom.*;
import arc.util.*;
import mindustry.annotations.Annotations.*;
import mindustry.entities.bullet.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.graphics.*;
@@ -12,11 +15,20 @@ import static mindustry.Vars.*;
@EntityDef(value = {Bulletc.class}, pooled = true)
@Component
abstract class BulletComp implements Timedc, Damagec, Collisionc, Teamc, Posc, Drawc, Shielderc, Ownerc, Velc, Bulletc, Timerc{
abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Drawc, Shielderc, Ownerc, Velc, Bulletc, Timerc{
@Import Team team;
Object data;
BulletType type;
float damage;
@Override
public void getCollisions(Cons<QuadTree> consumer){
for(Team team : state.teams.enemiesOf(team)){
consumer.get(teamIndex.tree(team));
}
}
@Override
public void drawBullets(){
type.draw(this);