Beispiel #1
0
        void SpawnTroll()
        {
            GameObject clone = Instantiate(trollPrefab, transform.position, transform.rotation);

            FollowTarget agent = clone.GetComponent <FollowTarget>();

            agent.target = target;
        }
Beispiel #2
0
        // Function for spawning Orcs
        void SpawnOrc()
        {
            GameObject clone = Instantiate(orcPrefab, transform.position, transform.rotation);

            // Do orc stuff
            FollowTarget agent = clone.GetComponent <FollowTarget>();

            agent.target = target;
        }