Aimbot-ParallelEnv/Assets/PlayerUI.cs
Koha9 f5724dcda7 Build for human
build for human play.
2022-12-04 06:29:50 +09:00

44 lines
1.1 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class PlayerUI : MonoBehaviour
{
public GameObject TargetConObj;
public GameObject ParamaObj;
public TextMeshProUGUI targetText;
public TextMeshProUGUI inareaText;
private TargetController targetController;
private ParameterContainer parameterContainer;
private void Start()
{
targetController = TargetConObj.GetComponent<TargetController>();
parameterContainer = ParamaObj.GetComponent<ParameterContainer>();
}
void Update()
{
int tType = targetController.targetTypeInt;
targetText.text = Enum.GetName(typeof(TargetController.Targets), tType);
if(tType == (int)TargetController.Targets.Go)
{
if (parameterContainer.agentInArea == 1)
{
inareaText.text = "In!";
}
else
{
inareaText.text = "nah";
}
}
else
{
inareaText.text = "nah";
}
}
}