Added mode-specific respawn time

This commit is contained in:
Anuken
2018-08-21 10:56:06 -04:00
parent 6dcbe4fabb
commit 0ddee379ca
3 changed files with 3 additions and 3 deletions

View File

@@ -28,8 +28,6 @@ import io.anuke.ucore.util.Translator;
import java.util.Locale;
public class Vars{
//respawn time in frames
public static final float respawnduration = 60 * 4;
//time between waves in frames (on normal mode)
public static final float wavespace = 60 * 60 * 1.5f;
//set ridiculously high for now

View File

@@ -21,10 +21,12 @@ public enum GameMode{
isPvp = true;
hidden = true;
enemyCoreBuildRadius = 600f;
respawnTime = 60 * 10;
}};
public boolean infiniteResources, disableWaveTimer, disableWaves, hidden, autoSpawn, isPvp;
public float enemyCoreBuildRadius = 400f;
public float respawnTime = 60 * 4;
public String description(){
return Bundles.get("mode." + name() + ".description");

View File

@@ -195,7 +195,7 @@ public class CoreBlock extends StorageBlock{
if(entity.currentUnit != null){
entity.heat = Mathf.lerpDelta(entity.heat, 1f, 0.1f);
entity.time += Timers.delta();
entity.progress += 1f / (entity.currentUnit instanceof Player ? respawnduration : droneRespawnDuration) * Timers.delta();
entity.progress += 1f / (entity.currentUnit instanceof Player ? state.mode.respawnTime : droneRespawnDuration) * Timers.delta();
//instant build for fast testing.
if(debug){