This commit is contained in:
Anuken 2019-06-16 23:38:50 -04:00
parent 9e97b5851e
commit 897c55c410
11 changed files with 17 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 707 B

After

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 KiB

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 KiB

After

Width:  |  Height:  |  Size: 402 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 294 KiB

View File

@ -669,7 +669,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
}
if(dst(moveTarget) <= 2f * Time.delta()){
if(tapping){
if(tapping && !isDead()){
Tile tile = ((TileEntity)moveTarget).tile;
tile.block().tapped(tile, this);
}

View File

@ -51,6 +51,7 @@ public class HudFragment extends Fragment{
private float coreAttackTime;
private float lastCoreHP;
private Team lastTeam;
private float coreAttackOpacity = 0f;
public void build(Group parent){
@ -314,13 +315,19 @@ public class HudFragment extends Fragment{
});
t.top().visible(() -> {
if(state.is(State.menu) || state.teams.get(player.getTeam()).cores.size == 0 ||
state.teams.get(player.getTeam()).cores.first().entity == null){
if(state.is(State.menu) || state.teams.get(player.getTeam()).cores.size == 0 || state.teams.get(player.getTeam()).cores.first().entity == null){
coreAttackTime = 0f;
return false;
}
float curr = state.teams.get(player.getTeam()).cores.first().entity.health;
if(lastTeam != player.getTeam()){
lastCoreHP = curr;
lastTeam = player.getTeam();
return false;
}
if(!Float.isNaN(lastCoreHP) && curr < lastCoreHP){
coreAttackTime = notifDuration;
}
@ -334,6 +341,7 @@ public class HudFragment extends Fragment{
}
coreAttackTime -= Time.delta();
lastTeam = player.getTeam();
return coreAttackOpacity > 0;
});
@ -538,6 +546,7 @@ public class HudFragment extends Fragment{
}
shown = !shown;
flip.getParent().act(Core.graphics.getDeltaTime());
}
private void addWaveTable(TextButton table){

View File

@ -193,7 +193,11 @@ public abstract class Turret extends Block{
protected void findTarget(Tile tile){
TurretEntity entity = tile.entity();
entity.target = Units.closestTarget(tile.getTeam(), tile.drawx(), tile.drawy(), range, e -> !e.isDead() && (!e.isFlying() || targetAir) && (e.isFlying() || targetGround));
if(targetAir && !targetGround){
entity.target = Units.closestEnemy(tile.getTeam(), tile.drawx(), tile.drawy(), range, e -> !e.isDead() && e.isFlying());
}else{
entity.target = Units.closestTarget(tile.getTeam(), tile.drawx(), tile.drawy(), range, e -> !e.isDead() && (!e.isFlying() || targetAir) && (e.isFlying() || targetGround));
}
}
protected void turnToTarget(Tile tile, float targetRot){

View File

@ -187,11 +187,6 @@ public class PowerGraph{
}
public void add(Tile tile){
if(tile.block().consumes.hasPower() && !tile.block().consumes.getPower().buffered){
//reset satisfaction to zero in case of direct consumer. There is no reason to clear power from buffered consumers.
tile.entity.power.satisfaction = 0.0f;
}
tile.entity.power.graph = this;
all.add(tile);