This commit is contained in:
2025-03-07 01:52:56 -08:00
parent 65e4af8595
commit e7ef669c29
16 changed files with 15 additions and 41 deletions

View File

@@ -80,6 +80,8 @@ public partial class Game : Node3D, IGame
private EffectService _effectService;
private double _expRate = 1;
public void Setup()
{
_container = new SimpleInjector.Container();
@@ -371,7 +373,7 @@ public partial class Game : Node3D, IGame
public void EnemyDefeated(Vector3 defeatedLocation, EnemyStatResource resource)
{
Player.GainExp(resource.ExpFromDefeat * GameRepo.EXPRate);
Player.GainExp(resource.ExpFromDefeat * _expRate);
}
private void DropRestorative(Vector3 vector)
@@ -444,13 +446,13 @@ public partial class Game : Node3D, IGame
ToggleInventory();
AnnounceMessageOnMainScreen("Experience points temporarily doubled.");
DoubleEXPTimer.Start(lengthOfEffect.Seconds);
GameRepo.EXPRate = 2;
_expRate = 2;
}
private void DoubleEXPTimer_Timeout()
{
DoubleEXPTimer.Stop();
GameRepo.EXPRate = 1;
_expRate = 1;
AnnounceMessageOnMainScreen("Experience points effect wore off.");
}