Fixed end of game trigger on subsequent game. Fixed score not being saved after not entering name.

This commit is contained in:
Max 2025-03-11 08:24:43 +01:00
parent a0ec711c4a
commit 64c08d6459
10 changed files with 395 additions and 108 deletions

View file

@ -73,9 +73,40 @@ namespace UI
{
RoomRewards.ChestRewarded -= HandleChestRewarded;
chestPopUpController.BlackDieSelected -= BlackDieAbilityGained;
chestPopUpController.KeySelected -= TorchAbilityGained;
chestPopUpController.ArmorAndDiamondSelected -= HealthAndDiamondGained;
GameManager.EndOfGame -= HandleEndOfGame;
chestPopUpController.BlackDieSelected -= chestRewardSelection.HandleBlackDiceSelected;
chestPopUpController.KeySelected -= chestRewardSelection.HandleTorchSelected;
chestPopUpController.ArmorAndDiamondSelected -= chestRewardSelection.HandleDiamondAndLifeSelected;
hudController.RollClicked -= diceRoller.RollDice;
hudController.PassClicked -= passManager.OnPassClicked;
diceRoller.Enabled -= () => hudController.SetDiceRollerEnabled(true);
diceRoller.Disabled -= () => hudController.SetDiceRollerEnabled(false);
startingBlackDieAbility.MarkUseUsedEvent -= hudController.MarkStartingBlackDieAbilityUsed;
startingBlackDieAbility.UnmarkUseUsedEvent -= hudController.UnmarkStartingBlackDieAbilityUsed;
hudController.StartingBlackDieAbilityClicked -= startingBlackDieAbility.UseClicked;
blackDieAbility.MarkUseUsedEvent -= hudController.MarkBlackDieAbilityUsed;
blackDieAbility.UnmarkUseUsedEvent -= hudController.UnmarkStartingBlackDieAbilityUsed;
blackDieAbility.AbilityGained -= hudController.SetBlackDieAbilityEnabled;
hudController.BlackDieAbilityClicked -= blackDieAbility.UseClicked;
chestRewardSelection.ArmorAndDiamondNoLongerAvailable -= chestPopUpController.DisableArmorAndDiamond;
chestRewardSelection.TorchNoLongerAvailable -= chestPopUpController.DisableKey;
chestRewardSelection.BlackDieNoLongerAvailable -= chestPopUpController.DisableBlackDie;
torchAbility.AbilityGained -= hudController.SetKeyAbilityEnabled;
TorchAbility.TorchAbilityUsed -= hudController.MarkKeyAbilityUsed;
hudController.KeyAbilityClicked -= torchAbility.UseClicked;
player.DiamondCountUpdated -= hudController.SetDiamondCount;
player.HealthUpdated -= hudController.SetHealth;
armorAbility.ArmorAbilityGained -= hudController.SetArmorAbilityEnabled;
armorAbility.MarkAbilityUsed -= hudController.MarkArmorAbilityUsed;
}
private void Start()