Reorganize SFX

This commit is contained in:
2025-03-10 22:13:09 -07:00
parent ed12c1cf15
commit 192f2eb316
29 changed files with 590 additions and 611 deletions

View File

@@ -23,6 +23,8 @@ public interface IGameRepo : IDisposable
event Action? PlayerAttackedWall;
event Action? PlayerAttackedEnemy;
void Pause();
void Resume();
@@ -43,6 +45,8 @@ public interface IGameRepo : IDisposable
public void OnPlayerAttackedWall();
public void OnPlayerAttackedEnemy();
public void CloseInventory();
public void GameEnded();
@@ -61,6 +65,7 @@ public class GameRepo : IGameRepo
public event Action<InventoryItem>? RemoveItemFromInventoryEvent;
public event Action? PlayerAttack;
public event Action? PlayerAttackedWall;
public event Action? PlayerAttackedEnemy;
public IAutoProp<bool> IsPaused => _isPaused;
private readonly AutoProp<bool> _isPaused;
@@ -97,6 +102,7 @@ public class GameRepo : IGameRepo
public void EndDoubleExp()
{
AnnounceMessageOnMainScreen("Experience points effect wore off.");
DoubleExpTimeEnd?.Invoke();
ExpRate = 1;
}
@@ -125,6 +131,11 @@ public class GameRepo : IGameRepo
PlayerAttackedWall?.Invoke();
}
public void OnPlayerAttackedEnemy()
{
PlayerAttackedEnemy?.Invoke();
}
public void CloseInventory()
{
CloseInventoryEvent?.Invoke();