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>(); }
private void Awake() { health = GetComponent <Health>(); _myNavMeshAgent = GetComponent <MyNavMeshAgent>(); GetLevelWaypoints(); }
void Start() { currentState = initialState; navAgent = GetComponent <MyNavMeshAgent>(); }