Finished converting to new UI.
This commit is contained in:
parent
f70f89324b
commit
105055b307
37 changed files with 24044 additions and 1227 deletions
|
|
@ -7,41 +7,39 @@ public class ChestRewardSelection : MonoBehaviour
|
|||
public static event Action DiamondAndLifeSelected;
|
||||
public static event Action TorchAbilitySelected;
|
||||
public static event Action BlackDiceAbilitySelected;
|
||||
|
||||
[SerializeField] private Button diamondAndLifeButton;
|
||||
[SerializeField] private Button torchButton;
|
||||
[SerializeField] private Button blackDiceButton;
|
||||
|
||||
public event Action ArmorAndDiamondNoLongerAvailable;
|
||||
public event Action TorchNoLongerAvailable;
|
||||
public event Action BlackDieNoLongerAvailable;
|
||||
public event Action DisplayChestReward;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
RoomRewards.ChestRewarded += HandChestRewarded;
|
||||
diamondAndLifeButton.onClick.AddListener(HandleDiamondAndLifeSelected);
|
||||
torchButton.onClick.AddListener(HandleTorchSelected);
|
||||
blackDiceButton.onClick.AddListener(HandleBlackDiceSelected);
|
||||
}
|
||||
|
||||
private void HandChestRewarded()
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
DisplayChestReward?.Invoke();
|
||||
}
|
||||
|
||||
private void HandleDiamondAndLifeSelected()
|
||||
public void HandleDiamondAndLifeSelected()
|
||||
{
|
||||
diamondAndLifeButton.interactable = false;
|
||||
ArmorAndDiamondNoLongerAvailable?.Invoke();
|
||||
DiamondAndLifeSelected?.Invoke();
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
private void HandleTorchSelected()
|
||||
public void HandleTorchSelected()
|
||||
{
|
||||
torchButton.interactable = false;
|
||||
TorchNoLongerAvailable?.Invoke();
|
||||
TorchAbilitySelected?.Invoke();
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
private void HandleBlackDiceSelected()
|
||||
public void HandleBlackDiceSelected()
|
||||
{
|
||||
blackDiceButton.interactable = false;
|
||||
BlackDieNoLongerAvailable?.Invoke();
|
||||
BlackDiceAbilitySelected?.Invoke();
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue