private void Start() { if (visionCone == null) { visionCone = GetComponentInChildren <EnemyVisionCone>(); } }
private void Start() { if (visionCone == null) { visionCone = GetComponentInChildren <EnemyVisionCone>(); } if (path == null) { Debug.LogError("enemy has no patrol path"); } enemyTarget.transform.position = path.nextPoint; nextPatrolPoint = enemyTarget.transform.position; }