This commit is contained in:
Anuken
2018-10-10 17:34:36 -04:00
parent 5f1bc6c6c2
commit 67db5e9dfc
4 changed files with 9 additions and 14 deletions

View File

@@ -39,12 +39,12 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
/**Maximum absolute value of a velocity vector component.*/ /**Maximum absolute value of a velocity vector component.*/
public static final float maxAbsVelocity = 127f / velocityPercision; public static final float maxAbsVelocity = 127f / velocityPercision;
public UnitInventory inventory = new UnitInventory(this); public final UnitInventory inventory = new UnitInventory(this);
public float rotation; public float rotation;
public float hitTime; public float hitTime;
protected Interpolator interpolator = new Interpolator(); protected final Interpolator interpolator = new Interpolator();
protected StatusController status = new StatusController(); protected final StatusController status = new StatusController();
protected Team team = Team.blue; protected Team team = Team.blue;
protected CarryTrait carrier; protected CarryTrait carrier;

View File

@@ -184,16 +184,6 @@ public class Sectors{
return true; return true;
} }
/*
private boolean canMerge(Sector s1, Sector s2){
int minx = Math.min(s1.x, s2.x);
int miny = Math.min(s1.y, s2.y);
int maxx = Math.max(s1.x + s1.width, s2.x + s2.width);
int maxy = Math.max(s1.y + s1.height, s2.y + s2.height);
}*/
/**Returns whether a sector of this size and position can be fit here.*/ /**Returns whether a sector of this size and position can be fit here.*/
public boolean canFit(int x, int y, int width, int height){ public boolean canFit(int x, int y, int width, int height){

View File

@@ -20,10 +20,10 @@ import io.anuke.mindustry.world.blocks.Floor;
import io.anuke.mindustry.world.blocks.OreBlock; import io.anuke.mindustry.world.blocks.OreBlock;
import io.anuke.ucore.noise.RidgedPerlin; import io.anuke.ucore.noise.RidgedPerlin;
import io.anuke.ucore.noise.Simplex; import io.anuke.ucore.noise.Simplex;
import io.anuke.ucore.util.Structs;
import io.anuke.ucore.util.Geometry; import io.anuke.ucore.util.Geometry;
import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.SeedRandom; import io.anuke.ucore.util.SeedRandom;
import io.anuke.ucore.util.Structs;
import static io.anuke.mindustry.Vars.sectorSize; import static io.anuke.mindustry.Vars.sectorSize;
import static io.anuke.mindustry.Vars.world; import static io.anuke.mindustry.Vars.world;

View File

@@ -31,6 +31,11 @@ public class BattleMission extends Mission{
//new FortressGenerator().generate(gen, Team.red, coreX, coreY, enemyX, enemyY); //new FortressGenerator().generate(gen, Team.red, coreX, coreY, enemyX, enemyY);
} }
@Override
public void onBegin(){
}
@Override @Override
public boolean isComplete(){ public boolean isComplete(){
for(Team team : Vars.state.teams.enemiesOf(Vars.defaultTeam)){ for(Team team : Vars.state.teams.enemiesOf(Vars.defaultTeam)){