Added mode-specific respawn time
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user