E_ElecCompetition/Electrical_inspectionCompet.../Assets/Script/Interactive objects/InteractiveArea2_1.cs

90 lines
1.8 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InteractiveArea2_1 : ToolBase
{ public GameObject ;
private Flow2_1 Flow2_1;
public Animator player;
// Start is called before the first frame update
protected override void Start()
{
base.Start();
Flow2_1 = (Flow2_1);
}
// Update is called once per frame
protected override void Update()
{
base.Update();
}
private void OnTriggerEnter(Collider other)
{
if (other.name == "Player")
{
if (. == .)
{
if (.flowManager. == .)
{
.SetActive(true);
if (Flow2_1..activeSelf == true)
{
for (int i = 0; i < Flow2_1..Length; i++)
{
Flow2_1.[i].SetActive(true);
}
}
else
{
for (int i = 0; i < Flow2_1..Length; i++)
{
Flow2_1.[i].SetActive(false);
}
}
}
Flow2_1..onClick.AddListener(onclick);
}
}
}
private void onclick() {
Debug.Log("next");
player.Play("工作证");
//Flow2_1.nextCheck();
. = .;
= true;
Flow2_1..onClick.RemoveAllListeners();
// Flow2_1.nextCheck();
}
}