You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
548 B
22 lines
548 B
|
1 month ago
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using TMPro;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class ButtonActiveSample : MonoBehaviour
|
||
|
|
{
|
||
|
|
private TextMeshPro ScreenDisplay;
|
||
|
|
// Start is called before the first frame update
|
||
|
|
void Start()
|
||
|
|
{
|
||
|
|
ScreenDisplay = GetComponentInChildren<TextMeshPro>();
|
||
|
|
}
|
||
|
|
|
||
|
|
public void ButtonAddNum()
|
||
|
|
{
|
||
|
|
int number = int.Parse(ScreenDisplay.text);
|
||
|
|
number = (number + 1) % 99;
|
||
|
|
ScreenDisplay.text = number > 9 ? number.ToString() : "0" + number.ToString();
|
||
|
|
}
|
||
|
|
}
|