Finished converting to new UI.
This commit is contained in:
parent
f70f89324b
commit
105055b307
37 changed files with 24044 additions and 1227 deletions
|
|
@ -3,6 +3,7 @@ using UnityEngine;
|
|||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UI;
|
||||
using static TagsAndLayers;
|
||||
using Random = Unity.Mathematics.Random;
|
||||
|
||||
|
|
@ -14,27 +15,22 @@ public class DiceRoller: MonoBehaviour
|
|||
private List<int> _rolledWhiteDice = new List<int>();
|
||||
private List<int> _rolledBlackDice = new List<int>();
|
||||
private System.Random _randomGen = new System.Random();
|
||||
[SerializeField] private Button rollDiceButton;
|
||||
|
||||
public GameObject dice;
|
||||
public event EventHandler diceRolled;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
rollDiceButton.onClick.AddListener(RollDice);
|
||||
}
|
||||
public static event EventHandler diceRolled;
|
||||
public event Action Enabled;
|
||||
public event Action Disabled;
|
||||
|
||||
public void Enable()
|
||||
{
|
||||
rollDiceButton.interactable = true;
|
||||
Enabled?.Invoke();
|
||||
}
|
||||
|
||||
public void Disable()
|
||||
{
|
||||
rollDiceButton.interactable = false;
|
||||
Disabled.Invoke();
|
||||
}
|
||||
|
||||
private void RollDice() {
|
||||
public void RollDice() {
|
||||
_rolledWhiteDice.Clear();
|
||||
_rolledBlackDice.Clear();
|
||||
for (int i = 0; i < NUMBER_OF_WHITE_DICE; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue