26 lines
726 B
C#
26 lines
726 B
C#
|
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
public class StartSceneTimeLimChanger : MonoBehaviour
|
||
|
{
|
||
|
public GameObject DataTransfer;
|
||
|
public Text TimeLimText;
|
||
|
public InputField TimelimInput;
|
||
|
|
||
|
public void onValueTimeChanged()
|
||
|
{
|
||
|
if (TimelimInput.GetComponent<InputField>().text == "" || TimelimInput.GetComponent<InputField>().text.Contains("-"))
|
||
|
{
|
||
|
TimeLimText.color = Color.gray;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
TimeLimText.color = Color.yellow;
|
||
|
DataTransfer.GetComponent<StartSeneData>().Timelim = Math.Abs(int.Parse(TimelimInput.GetComponent<InputField>().text));
|
||
|
}
|
||
|
}
|
||
|
}
|