FINAL JAM COMMIT
This commit is contained in:
@@ -8,9 +8,11 @@ public partial class GameController : Node
|
||||
[Export] private float _ShrineStartHP;
|
||||
[Export] private Label _CurrencyLabel;
|
||||
[Export] private Label _ShrineHealthLabel;
|
||||
[Export] private Label _scoreLabel;
|
||||
|
||||
public int Wave { get; private set; }
|
||||
public int Currency { get; private set; }
|
||||
public int Score { get; private set; }
|
||||
public float ShrineHealth { get; private set; }
|
||||
|
||||
private bool _waveOnGoing = false;
|
||||
@@ -20,10 +22,11 @@ public partial class GameController : Node
|
||||
GameController.Instance = this;
|
||||
Wave = 0;
|
||||
Currency = 300;
|
||||
ShrineHealth = 100;
|
||||
|
||||
ShrineHealth = _ShrineStartHP;
|
||||
|
||||
_CurrencyLabel.Text = Currency.ToString();
|
||||
_ShrineHealthLabel.Text = $"{(100f * (ShrineHealth /_ShrineStartHP)):F1}%";
|
||||
_scoreLabel.Text = "0";
|
||||
|
||||
CallDeferred(nameof(DelayNextWave));
|
||||
}
|
||||
@@ -34,12 +37,7 @@ public partial class GameController : Node
|
||||
Wave++;
|
||||
_waveOnGoing = true;
|
||||
|
||||
int amountToSpawn = (int)Math.Round(5 * Math.Pow(Wave, 1.05));
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
// GD.Print((int)Math.Round(5 * Math.Pow(i + 1, 1.05)));
|
||||
}
|
||||
int amountToSpawn = (int)Math.Round(5 * Math.Pow(Wave, 1.025));
|
||||
|
||||
EnemySpawner.Instance.EnemiesSpawned = amountToSpawn;
|
||||
|
||||
@@ -73,7 +71,7 @@ public partial class GameController : Node
|
||||
_ShrineHealthLabel.Text = $"{(100f * (ShrineHealth /_ShrineStartHP)):F1}%";
|
||||
if (ShrineHealth <= 0)
|
||||
{
|
||||
// TODO LOSE SCENARIO
|
||||
SceneManager.Instance.ChangeScene(Scenes.End);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +79,8 @@ public partial class GameController : Node
|
||||
{
|
||||
v = Math.Abs(v);
|
||||
Currency += v;
|
||||
Score += v;
|
||||
_scoreLabel.Text = Score.ToString();
|
||||
_CurrencyLabel.Text = Currency.ToString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user