예제 #1
0
파일: TrollAI.cs 프로젝트: alexpech12/Troll
    // 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;
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     trollSense = troll.GetComponent <TrollSense>();
 }