コード例 #1
0
    private void Start()
    {
        //get our PlayerScript component
        player = GameObject.Find("Player").GetComponent <PlayerScript>();

        //get our Labirinth manager component
        mazeScript = GameObject.Find("Labirinth Manager").GetComponent <LabirinthManager>();

        //get our NavMeshAgent component
        navMeshAgent = GetComponent <NavMeshAgent>();

        //Set a random destination for our enemy
        SetDestination();
    }