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(); } }