PuzzleGame/PuzzleGameProject/Assets/Scripts/Die.cs
2025-01-19 18:59:50 +01:00

18 lines
404 B
C#

using System;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class Die : MonoBehaviour
{
private int _result = 0;
public void SetResult(int result) {
_result = result;
gameObject.GetComponentInChildren<TextMeshProUGUI>().text = _result.ToString();
}
public void ClearDie() {
gameObject.GetComponent<TextMeshProUGUI>().text = String.Empty;
}
}