using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using UDE_HAND_INTERACTION; using Unity.VisualScripting; using UnityEngine; using DG.Tweening; public class BellSample : MonoBehaviour { private InteractableObject ObjectManager; // Start is called before the first frame update void Start() { ObjectManager = GetComponent(); } // Update is called once per frame void Update() { } private void OnTriggerEnter(Collider other) { if (!ObjectManager.IsFollow) return; if (other.name == "BellDetectArea") { var OtherInteractObj = other.GetComponent(); transform.parent = other.transform; transform.DOLocalMove(Vector3.zero, 0.2f); transform.DOLocalRotate(Vector3.zero, 0.2f); ObjectManager.SwitchHandInteractioinPlan(1); if (ObjectManager.Hand.name[0] == 'L') { ObjectManager.Hand.GetComponent().ForceActive(ObjectManager, ObjectManager.HandInteractions[0]); } else { ObjectManager.Hand.GetComponent().ForceActive(ObjectManager, ObjectManager.HandInteractions[1]); } other.GetComponentInParent().SwitchHandInteractioinPlan(1); } } }