using System.Collections; using System.Collections.Generic; using UnityEngine; public class InteractiveArea4_5 : ToolBase { //public GameObject 触发物体; public Animator 并网柜; private bool first = true; // Start is called before the first frame update protected override void Start() { base.Start(); EventTriggerListener.Get(transform.gameObject).onClick += g => { if (first == true) { 并网柜.GetComponent().Play("开门"); 交互完成 = true; first = false; } }; } protected override void Update() { base.Update(); } }