Removed camera clamp / Self-destruct timer / More blend tweaks

This commit is contained in:
Anuken
2019-01-30 19:48:41 -05:00
parent c046a1b474
commit 43bff5c34d
12 changed files with 71 additions and 27 deletions

View File

@@ -48,11 +48,9 @@ public class DeployDialog extends FloatingDialog{
}
public void setup(){
try{
Class.forName("io.anuke.arc.recorder.GifRecorder");
}catch(Throwable t){
if(!System.getProperty("mindustry.debug", "false").equals("true")){
ui.showInfo("This is not ready for testing. Play custom games instead.");
hide();
Core.app.post(this::hide);
return;
}

View File

@@ -17,10 +17,7 @@ import io.anuke.arc.scene.ui.layout.Stack;
import io.anuke.arc.scene.ui.layout.Table;
import io.anuke.arc.scene.ui.layout.Unit;
import io.anuke.arc.scene.utils.Elements;
import io.anuke.arc.util.Align;
import io.anuke.arc.util.Scaling;
import io.anuke.arc.util.Time;
import io.anuke.arc.util.Tmp;
import io.anuke.arc.util.*;
import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.game.EventType.StateChangeEvent;
import io.anuke.mindustry.game.Team;
@@ -33,6 +30,8 @@ import io.anuke.mindustry.net.Packets.AdminAction;
import io.anuke.mindustry.ui.IntFormat;
import io.anuke.mindustry.ui.dialogs.FloatingDialog;
import java.lang.StringBuilder;
import static io.anuke.mindustry.Vars.*;
public class HudFragment extends Fragment{
@@ -154,6 +153,7 @@ public class HudFragment extends Fragment{
t.table("button", top -> top.add("$paused").pad(6f));
});
//spawner warning
parent.fill(t -> {
t.touchable(Touchable.disabled);
t.visible(() -> !state.is(State.menu));
@@ -165,6 +165,20 @@ public class HudFragment extends Fragment{
}).get().color.a = 0f;
});
//out of bounds warning
parent.fill(t -> {
t.touchable(Touchable.disabled);
t.visible(() -> !state.is(State.menu));
t.table("flat", c -> c.add("")
.update(l ->{
l.setColor(Tmp.c1.set(Color.WHITE).lerp(Color.SCARLET, Mathf.absin(Time.time(), 10f, 1f)));
l.setText(Core.bundle.format("outofbounds", (int)((boundsCountdown - players[0].destructTime) / 60f)));
}).get().setAlignment(Align.center, Align.center))
.margin(6).update(u -> {
u.color.a = Mathf.lerpDelta(u.color.a, Mathf.num(players[0].isOutOfBounds()), 0.1f);
}).get().color.a = 0f;
});
parent.fill(t -> {
t.visible(() -> netServer.isWaitingForPlayers() && !state.is(State.menu));
t.table("button", c -> c.add("$waiting.players"));

View File

@@ -59,7 +59,7 @@ public class MenuFragment extends Fragment{
MobileButton
play = new MobileButton("icon-play-2", isize, "$play", ui.deploy::show),
maps = new MobileButton("icon-map", isize, "$maps", ui.maps::show),
custom = new MobileButton("icon-play-custom", isize, "customgame", this::showCustomSelect),
custom = new MobileButton("icon-play-custom", isize, "$customgame", this::showCustomSelect),
join = new MobileButton("icon-add", isize, "$joingame", ui.join::show),
editor = new MobileButton("icon-editor", isize, "$editor", () -> ui.loadAnd(ui.editor::show)),
tools = new MobileButton("icon-tools", isize, "$settings", ui.settings::show),