Started implementing SFX
Fixed Shield animation jumps and secondary attack Fixed demon wall stone behavior Made overworld ambient sounds unpausable
This commit is contained in:
@@ -162,6 +162,8 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
GameRepo.RestorativePickedUp += GameEventDepot_RestorativePickedUp;
|
||||
|
||||
_player.Inventory.BroadcastMessage += BroadcastMessage;
|
||||
|
||||
_player.PlayerDied += GameOver;
|
||||
DeathMenu.NewGame += OnNewGame;
|
||||
DeathMenu.QuitGame += OnQuit;
|
||||
@@ -170,6 +172,11 @@ public partial class Game : Node3D, IGame
|
||||
InGameUI.PlayerInfoUI.Activate();
|
||||
}
|
||||
|
||||
private void BroadcastMessage(string obj)
|
||||
{
|
||||
InGameUI.InventoryMessageUI.DisplayMessage(obj);
|
||||
}
|
||||
|
||||
public void LoadExistingGame() => SaveFile.Load().ContinueWith((_) => CallDeferred(nameof(FinishedLoadingSaveFile)));
|
||||
|
||||
public async Task InitializeGame()
|
||||
@@ -371,14 +378,26 @@ public partial class Game : Node3D, IGame
|
||||
private void EnactConsumableItemEffects(ConsumableItem consumableItem)
|
||||
{
|
||||
if (_player.HealthComponent.AtFullHealth && consumableItem.RaiseHPAmount > 0)
|
||||
{
|
||||
_player.HealthComponent.RaiseMaximumHP(consumableItem.RaiseHPAmount);
|
||||
SfxDatabase.Instance.Play(SoundEffect.IncreaseStat);
|
||||
}
|
||||
if (_player.VTComponent.AtFullVT && consumableItem.RaiseVTAmount > 0)
|
||||
{
|
||||
_player.VTComponent.RaiseMaximumVT(consumableItem.RaiseVTAmount);
|
||||
SfxDatabase.Instance.Play(SoundEffect.IncreaseStat);
|
||||
}
|
||||
|
||||
if (consumableItem.HealHPAmount > 0)
|
||||
{
|
||||
_player.HealthComponent.Heal(consumableItem.HealHPAmount);
|
||||
SfxDatabase.Instance.Play(SoundEffect.HealHP);
|
||||
}
|
||||
if (consumableItem.HealVTAmount > 0)
|
||||
{
|
||||
_player.VTComponent.Restore(consumableItem.HealVTAmount);
|
||||
SfxDatabase.Instance.Play(SoundEffect.HealVT);
|
||||
}
|
||||
}
|
||||
|
||||
private void EnactEffectItemEffects(EffectItem effectItem)
|
||||
@@ -388,6 +407,7 @@ public partial class Game : Node3D, IGame
|
||||
case UsableItemTag.TeleportAllEnemiesToRoom:
|
||||
_effectService.TeleportEnemiesToCurrentRoom();
|
||||
GameRepo.CloseInventory();
|
||||
SfxDatabase.Instance.Play(SoundEffect.RecallEnemies);
|
||||
break;
|
||||
case UsableItemTag.KillHalfEnemiesInRoom:
|
||||
_effectService.KillHalfEnemiesInRoom();
|
||||
@@ -482,6 +502,8 @@ public partial class Game : Node3D, IGame
|
||||
FloorClearMenu.Exit -= FloorClearMenu_Exit;
|
||||
FloorClearMenu.TransitionCompleted -= FloorClearMenu_TransitionCompleted;
|
||||
|
||||
_player.Inventory.BroadcastMessage -= BroadcastMessage;
|
||||
|
||||
GameRepo.RestorativePickedUp -= GameEventDepot_RestorativePickedUp;
|
||||
|
||||
DeathMenu.NewGame -= OnNewGame;
|
||||
|
||||
Reference in New Issue
Block a user