Exemplo n.º 1
0
    void OnTriggerExit(Collider col)
    {
        MoluvushaEatable molScript = col.gameObject.GetComponent <MoluvushaEatable>();

        if (molScript)
        {
            molList.Remove(molScript.rootMoluvushaGO);
        }
    }
Exemplo n.º 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);
            }
        }
    }