Refactored clicking on dice and rooms so that logic is moved out of the game manager
This commit is contained in:
parent
ede5ef1533
commit
e7ea8302ad
8 changed files with 150 additions and 67 deletions
|
|
@ -15,10 +15,10 @@ public class PassManager : MonoBehaviour
|
|||
void Start()
|
||||
{
|
||||
passButton.onClick.AddListener(OnPassClicked);
|
||||
gameManager.StateChanged += OnGameStateChange;
|
||||
gameManager.StateChanged += HandleStateChange;
|
||||
}
|
||||
|
||||
private void OnGameStateChange(object sender, GameState state) {
|
||||
private void HandleStateChange(GameState state) {
|
||||
if (state == GameState.RollDice)
|
||||
{
|
||||
passButton.interactable = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue