// Start is called before the first frame update void Start() { enemy = gameObject.GetComponent <Enemy>(); enemySpriteRenderer = gameObject.GetComponent <SpriteRenderer>(); movementSprites = enemy.GetMovementSprites(); thereAreMovementSprites = movementSprites.Length > 0; enemyPath = waveConfig.GetPathPrefab(); destroyOnLastWaypoint = waveConfig.GetDestroyOnLastWaypoint(); waypointIndex = 0; transform.position = enemyPath[waypointIndex].position; }