Clean up
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user