HH debug prints

This commit is contained in:
Chiss 2013-11-01 08:27:45 +11:00
parent d41338b76a
commit 7dcd58ec2d
2 changed files with 44 additions and 2 deletions

View File

@ -28,7 +28,7 @@ import nautilus.game.arcade.game.games.champions.kits.KitKnight;
import nautilus.game.arcade.game.games.champions.map.*;
import nautilus.game.arcade.game.games.smash.kits.*;
import nautilus.game.arcade.kit.Kit;
public class Champions extends TeamGame
{
//Class Combat

View File

@ -54,7 +54,12 @@ public class Halloween extends SoloGame
public long total = 0;
public long move = 0;
public long wave = 0;
public long sound = 0;
public long update = 0;
public long damage = 0;
public long target = 0;
public Halloween(ArcadeManager manager)
{
super(manager, GameType.Halloween,
@ -105,6 +110,23 @@ public class Halloween extends SoloGame
_waves.add(new WaveVictory(this));
}
@EventHandler(priority = EventPriority.MONITOR)
public void Clean(GameStateChangeEvent event)
{
if (event.GetState() != GameState.End)
return;
for (CreatureBase ent : _mobs)
ent.GetEntity().remove();
_mobs.clear();
_spawns.clear();
_spawns = null;
_mobs = null;
_waves = null;
}
@EventHandler(priority = EventPriority.MONITOR)
public void TeamGen(GameStateChangeEvent event)
{
@ -121,12 +143,27 @@ public class Halloween extends SoloGame
return;
System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
System.out.println("Game State: " + GetState());
System.out.println("Wave #: " + _wave);
System.out.println("Mobs #: " + _mobs.size());
System.out.println(" ");
System.out.println("Total Time: " + UtilTime.convertString(total, 4, TimeUnit.MILLISECONDS));
System.out.println("Move Time: " + UtilTime.convertString(move, 4, TimeUnit.MILLISECONDS));
System.out.println("Wave Time: " + UtilTime.convertString(wave, 4, TimeUnit.MILLISECONDS));
System.out.println("Sound Time: " + UtilTime.convertString(sound, 4, TimeUnit.MILLISECONDS));
System.out.println("Update Time: " + UtilTime.convertString(update, 4, TimeUnit.MILLISECONDS));
System.out.println("Damage Time: " + UtilTime.convertString(damage, 4, TimeUnit.MILLISECONDS));
System.out.println("Target Time: " + UtilTime.convertString(target, 4, TimeUnit.MILLISECONDS));
System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
total = 0;
move = 0;
wave = 0;
sound = 0;
update = 0;
damage = 0;
target = 0;
}
@EventHandler
@ -147,6 +184,7 @@ public class Halloween extends SoloGame
player.playSound(player.getLocation(), Sound.AMBIENCE_CAVE, 3f, 1f);
total += System.currentTimeMillis() - start;
sound += System.currentTimeMillis() - start;
}
@EventHandler
@ -168,6 +206,7 @@ public class Halloween extends SoloGame
}
total += System.currentTimeMillis() - start;
wave += System.currentTimeMillis() - start;
}
public ArrayList<Location> GetSpawnSet(int i)
@ -236,6 +275,7 @@ public class Halloween extends SoloGame
}
total += System.currentTimeMillis() - start;
update += System.currentTimeMillis() - start;
}
@EventHandler
@ -247,6 +287,7 @@ public class Halloween extends SoloGame
base.Damage(event);
total += System.currentTimeMillis() - start;
damage += System.currentTimeMillis() - start;
}
@EventHandler
@ -258,6 +299,7 @@ public class Halloween extends SoloGame
base.Target(event);
total += System.currentTimeMillis() - start;
target += System.currentTimeMillis() - start;
}
@EventHandler(priority = EventPriority.HIGHEST)