// Use this for initialization void Start() { sense = GetComponent <TrollSense>(); state = GetComponent <TrollState>(); agent = GetComponent <NavMeshAgent>(); anim = mesh.GetComponent <Animator>(); Transform playerGhost = Instantiate(playerGhostPrefab); target = playerGhost.GetComponent <PlayerGhostScript>(); target.troll = transform; target.UpdateRandomPosition(); //agent.updatePosition = false; }
// Use this for initialization void Start() { trollSense = troll.GetComponent <TrollSense>(); }