Aimbot-PPO/Aimbot-PPO-MultiScene/Assets/Script/Start/LoadDirChanger.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

38 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class LoadDirChanger : MonoBehaviour
{
public InputField LoadDirDateTextBox;
public InputField LoadDirTimeTextBox;
public Toggle Toggle;
public GameObject DataTransfer;
public void OnDirToggleChanged()
{
// if loadDirToggle is on then turn off the input text boxs.
LoadDirDateTextBox.interactable = Toggle.isOn;
LoadDirTimeTextBox.interactable = Toggle.isOn;
// if loadDirToggle is off set loaddirs as 0.
if (!Toggle.isOn)
{
DataTransfer.GetComponent<StartSeneData>().LoadDirDate = "0";
DataTransfer.GetComponent<StartSeneData>().LoadDirTime = "0";
}
}
public void OnDateValueChanged()
{
string input = LoadDirDateTextBox.GetComponent<InputField>().text;
DataTransfer.GetComponent<StartSeneData>().LoadDirDate = input;
}
public void OnTimeValueChanged()
{
string input = LoadDirTimeTextBox.GetComponent<InputField>().text;
DataTransfer.GetComponent<StartSeneData>().LoadDirTime = input;
}
}