unify gamemaster buttons and text
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using EscapeRoomEngine.Engine.Runtime.Measurements;
|
||||
using NaughtyAttributes;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -25,8 +26,12 @@ namespace EscapeRoomEngine.Engine.Runtime
|
||||
}
|
||||
private static GameControl _foundGameControl;
|
||||
|
||||
[SerializeField] private Button startButton, stopButton, pauseButton, resumeButton, addMinuteButton, removeMinuteButton;
|
||||
[SerializeField] private Text timeText;
|
||||
[BoxGroup("Internal")]
|
||||
[SerializeField]
|
||||
private Button startButton, stopButton, pauseButton, resumeButton, addTimeButton, removeTimeButton;
|
||||
[BoxGroup("Internal")]
|
||||
[SerializeField]
|
||||
private Text timeText;
|
||||
|
||||
[HideInInspector] public GameState gameState = GameState.Stopped;
|
||||
|
||||
@@ -52,8 +57,8 @@ namespace EscapeRoomEngine.Engine.Runtime
|
||||
stopButton.interactable = gameState != GameState.Stopped;
|
||||
pauseButton.interactable = gameState == GameState.Running;
|
||||
resumeButton.interactable = gameState == GameState.Paused;
|
||||
addMinuteButton.interactable = gameState != GameState.Stopped;
|
||||
removeMinuteButton.interactable = gameState != GameState.Stopped && _timeElapsed >= 10;
|
||||
addTimeButton.interactable = gameState != GameState.Stopped;
|
||||
removeTimeButton.interactable = gameState != GameState.Stopped && _timeElapsed >= 10;
|
||||
}
|
||||
|
||||
#region Time Controls
|
||||
|
||||
Reference in New Issue
Block a user