Beispiel #1
0
    void OnTriggerStay(Collider other)
    {
        Aspect aspect = other.GetComponent <Aspect>();

        if (aspect != null && aspect.aspectName == aspectName)
        {
            patrol.Run(other.GetComponent <Transform>().position);
            if (DetectAspect())
            {
                other.GetComponent <FirstPersonController>().DieOnCollisionWithMonster();
            }
        }
    }