using System.Collections; using System.Collections.Generic; using UnityEngine; public class TriggerDetectorSeries : MonoBehaviour { private void OnTriggerEnter(Collider other) { if (other.CompareTag("WristLeft")) { //other.GetComponent().material.color = new Color(1, 1, 1); //other.GetComponent().startColor = new Color(1, 1, 1); //BodySourceView bsv = other.GetComponentInParent(); //bsv.wristLeftLate = false; //Visualizer_FadeInSeries vfi = GetComponentInParent(); //vfi.wristLeftTriggered = true; // TODO: Destroy visualization step if it is touched (need to test) Destroy(gameObject.transform.parent); } else if (other.CompareTag("WristRight")) { //other.GetComponent().material.color = new Color(1, 1, 1); //other.GetComponent().startColor = new Color(1, 1, 1); //BodySourceView bsv = other.GetComponentInParent(); //bsv.wristRightLate = false; //Visualizer_FadeInSeries vfi = GetComponentInParent(); //vfi.wristRightTriggered = true; Destroy(gameObject.transform.parent); } } }