New custom games and custom rules screen (#464)
* New waves and limited respawning option. Added ability to manipulate number of respawns per wave. Added option to hold counting for next wave until all enemies are destroyed * Critical bug fixed Fixed frozen wave timer when rules.waitForWaveToEnd was enabled * Requested changes * Missed Import * New custom game and custom rules screen RulePreset is now a Gamemode (because each of them has a different goal). New button under Gamemode selection which opens a dialog to modify rules of gamemode. Now without any mutually exclusive options * Requested changes * Applied some text sugestions * Wrong waveInProgress message displaying fixed * Unwanted text * Text changes * I broke git * Fixed chrash * More fixes New rule : manyCores; needed for sanbox mode * Visual fix * Requested changes #1 : small oversights * Moved respawning logic to Player and another imports cleanup * manyCores in now attackMode * UI changes * Given back waves to sandbox and integer input in custom rules * Renamed functions in CustomRulesScreen * SPACES... Actually one space...
This commit is contained in:
committed by
Anuken
parent
52cd4a77dd
commit
af91979d4c
@@ -54,6 +54,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
||||
public Color color = new Color();
|
||||
public Mech mech;
|
||||
public SpawnerTrait spawner, lastSpawner;
|
||||
public int respawns;
|
||||
|
||||
public NetConnection con;
|
||||
public boolean isLocal = false;
|
||||
@@ -103,6 +104,9 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
||||
public void onRespawn(Tile tile){
|
||||
boostHeat = 1f;
|
||||
achievedFlight = true;
|
||||
if(state.rules.limitedRespawns){
|
||||
respawns--;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -489,7 +493,6 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
|
||||
hitTime -= Time.delta();
|
||||
|
||||
if(Float.isNaN(x) || Float.isNaN(y)){
|
||||
@@ -516,7 +519,9 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
||||
if(isDead()){
|
||||
isBoosting = false;
|
||||
boostHeat = 0f;
|
||||
updateRespawning();
|
||||
if(respawns!=0){
|
||||
updateRespawning();
|
||||
}
|
||||
return;
|
||||
}else{
|
||||
spawner = null;
|
||||
@@ -777,6 +782,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
||||
boostHeat = drownTime = hitTime = 0f;
|
||||
mech = getStarterMech();
|
||||
placeQueue.clear();
|
||||
respawns = state.rules.respawns;
|
||||
}
|
||||
|
||||
public Mech getStarterMech(){
|
||||
|
||||
Reference in New Issue
Block a user