Implement in-game sidebars
This commit is contained in:
@@ -2,6 +2,7 @@ package gg.malloc.defense.engine;
|
||||
|
||||
import gg.malloc.defense.model.Wave;
|
||||
import gg.malloc.defense.model.Game;
|
||||
import gg.malloc.defense.model.Progress;
|
||||
|
||||
public class WaveManager {
|
||||
int m_currentWaveNum = 0;
|
||||
@@ -9,6 +10,10 @@ public class WaveManager {
|
||||
Wave m_currentWave = null;
|
||||
Game m_game;
|
||||
|
||||
public Progress asProgress() {
|
||||
return new StaticProgress(m_currentWaveNum, m_game.getWaveCount());
|
||||
}
|
||||
|
||||
public WaveManager(Game game) {
|
||||
m_game = game;
|
||||
}
|
||||
@@ -31,10 +36,6 @@ public class WaveManager {
|
||||
return m_currentBatch;
|
||||
}
|
||||
|
||||
public double progress() {
|
||||
return (double)m_currentWaveNum / (double)m_game.getWaveCount();
|
||||
}
|
||||
|
||||
public boolean isLastWave() {
|
||||
return m_currentWaveNum >= m_game.getWaveCount();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user