コード例 #1
0
    void OnTriggerExit(Collider col)
    {
        MoluvushaEatable molScript = col.gameObject.GetComponent <MoluvushaEatable>();

        if (molScript)
        {
            molList.Remove(molScript.rootMoluvushaGO);
        }
    }
コード例 #2
0
    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);
            }
        }
    }