Exemple #1
0
    void Start()
    {
        currentState = initialState;
        navAgent     = GetComponent <MyNavMeshAgent>();
        lineRenderer = GetComponent <LineRenderer>();

        lineRenderer.material       = new Material(Shader.Find("Sprites/Default"));
        lineRenderer.material.color = Color.red;
        lineRenderer.startWidth     = 0.5f;
        lineRenderer.endWidth       = 0.5f;
        playerObject = GameObject.Find("Player");
        player       = playerObject.GetComponent <Player>();
    }
Exemple #2
0
 private void Awake()
 {
     health          = GetComponent <Health>();
     _myNavMeshAgent = GetComponent <MyNavMeshAgent>();
     GetLevelWaypoints();
 }
 void Start()
 {
     currentState = initialState;
     navAgent     = GetComponent <MyNavMeshAgent>();
 }