18 lines
404 B
C#
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;
|
|
}
|
|
}
|