コード例 #1
0
    private void Start()
    {
        // Find the active player defined by Become Script
        player = GameObject.FindWithTag("ActivePlayer");

        // Get the NavMeshAgent components
        controller = GetComponent <NavMeshController>();
        agent      = controller.GetComponent <NavMeshAgent>();
    }
コード例 #2
0
ファイル: EnemyPatrol.cs プロジェクト: Joe-Power/DivIsland
    void Start()
    {
        currentPatrolPoint = 0;

        // Get the NavMeshAgent component
        //agent = this.GetComponent<NavMeshAgent>();
        controller = GetComponentInParent <NavMeshController>();
        agent      = controller.GetComponent <NavMeshAgent>();


        // Enemy starts his round
        StartPatrol();
    }