Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        player         = GameObject.FindGameObjectWithTag("Player");
        detection      = GetComponentInChildren <AIDetection>();
        gameObject.tag = "Generated";
        audioSource    = GetComponent <AudioSource>();

        playerInRange = false;
        hitParticles  = GetComponent <ParticleSystem>();
        targetSet     = false;
        caughtPlayer  = false;
    }
Пример #2
0
 void Start()
 {
     animator  = GetComponent <Animator>();
     detection = GetComponentInChildren <AIDetection>();
 }