Added mode-specific respawn time
This commit is contained in:
@@ -28,8 +28,6 @@ import io.anuke.ucore.util.Translator;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
public class Vars{
|
public class Vars{
|
||||||
//respawn time in frames
|
|
||||||
public static final float respawnduration = 60 * 4;
|
|
||||||
//time between waves in frames (on normal mode)
|
//time between waves in frames (on normal mode)
|
||||||
public static final float wavespace = 60 * 60 * 1.5f;
|
public static final float wavespace = 60 * 60 * 1.5f;
|
||||||
//set ridiculously high for now
|
//set ridiculously high for now
|
||||||
|
|||||||
@@ -21,10 +21,12 @@ public enum GameMode{
|
|||||||
isPvp = true;
|
isPvp = true;
|
||||||
hidden = true;
|
hidden = true;
|
||||||
enemyCoreBuildRadius = 600f;
|
enemyCoreBuildRadius = 600f;
|
||||||
|
respawnTime = 60 * 10;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
public boolean infiniteResources, disableWaveTimer, disableWaves, hidden, autoSpawn, isPvp;
|
public boolean infiniteResources, disableWaveTimer, disableWaves, hidden, autoSpawn, isPvp;
|
||||||
public float enemyCoreBuildRadius = 400f;
|
public float enemyCoreBuildRadius = 400f;
|
||||||
|
public float respawnTime = 60 * 4;
|
||||||
|
|
||||||
public String description(){
|
public String description(){
|
||||||
return Bundles.get("mode." + name() + ".description");
|
return Bundles.get("mode." + name() + ".description");
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ public class CoreBlock extends StorageBlock{
|
|||||||
if(entity.currentUnit != null){
|
if(entity.currentUnit != null){
|
||||||
entity.heat = Mathf.lerpDelta(entity.heat, 1f, 0.1f);
|
entity.heat = Mathf.lerpDelta(entity.heat, 1f, 0.1f);
|
||||||
entity.time += Timers.delta();
|
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.
|
//instant build for fast testing.
|
||||||
if(debug){
|
if(debug){
|
||||||
|
|||||||
Reference in New Issue
Block a user