void OnTriggerExit(Collider col) { MoluvushaEatable molScript = col.gameObject.GetComponent <MoluvushaEatable>(); if (molScript) { molList.Remove(molScript.rootMoluvushaGO); } }
void OnTriggerStay(Collider col) { MoluvushaEatable molScript = col.gameObject.GetComponent <MoluvushaEatable>(); if (molScript) { molList.Add(molScript.rootMoluvushaGO); // Debug.Log("OnTriggerStay : "+molList.Count); GameObject currM = GetClosestMoluvusha(); if (currM && isEnableChasing) { moverScript.SetLightEaterMoluvusha(currM); } } }