I wrote everything identical as it was in the video, i also re-write all the codes and made the project by zero following again all the videos, but as soon ad i create this EnemySpawner.cs file, once I reach the 9.55 minute in the 99th lesson, i get this following error:
“Assets\Scripts\EnemySpawner.cs(12,27): error CS1955: Non-invocable member ‘EnemySpawner.waweConfigs’ cannot be used like a method.”
And the following is all the code for the EnemySpawner.cs file:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemySpawner : MonoBehaviour
{
[SerializeField] List waweConfigs;
int startingWawe = 0;
// Start is called before the first frame update
void Start()
{
var currentWawe = waweConfigs(startingWawe); //Here is where the error is underlined by the visual studio program: “waweConfigs”
StartCoroutine(SpawnAllEnemiesInWawe(currentWawe));
}
private IEnumerator SpawnAllEnemiesInWawe(WaweConfig waweConfig)
{
Instantiate(
waweConfig.GetEnemyPrefab(),
waweConfig.GetWaypoints()[0].transform.position,
Quaternion.identity);
yield return new WaitForSeconds(waweConfig.GetTimeBetweenSpawns());
}
// Update is called once per frame
void Update()
{
}
}