Aimbot-PPO/Aimbot-PPO-MultiScene/Assets/Script/Start/SceneChange.cs
Koha9 de066f3a65 Delete near Enemy Detect future. Use different density sensor.
Unity:
No more detect Closest enemy info. Add different density sensor let agent get more state information on the center of view. 
Adjust Start Scene UI manager. Add in game visible rayCast & information that rayCast detect.
Python:
Start use mypy black and flake8 to format Python.
2022-09-30 22:36:47 +09:00

40 lines
1.1 KiB
C#

using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class SceneChange : MonoBehaviour
{
public GameObject DataTransfer;
public Text errorText;
// Start is called before the first frame update
bool checkLoadDirFormat()
{
string thisLoadDirDate = DataTransfer.GetComponent<StartSeneData>().LoadDirDate;
string thisLoadDirTime = DataTransfer.GetComponent<StartSeneData>().LoadDirTime;
int LoadDirDateLength = thisLoadDirDate.Length;
int LoadDirTimeLength = thisLoadDirTime.Length;
if ((LoadDirDateLength == 8 && LoadDirTimeLength == 6) || (thisLoadDirDate == "0" && thisLoadDirTime == "0"))
{
return true;
}
else
{
return false;
}
}
public void onStartClick()
{
if (checkLoadDirFormat())
{
errorText.text = "Loading next Scene...";
errorText.color = Color.green;
SceneManager.LoadScene("InGame");
}
else
{
errorText.text = "Dir Format error";
}
}
}