void Start() { GameObject playerObj = FindObjectOfType<Player>().gameObject; playerCurrentWeapon = Interface.Find<IPlayerCurrentWeapon>(playerObj); if (playerCurrentWeapon == null) Debug.LogError("IPlayerCurrentWeapon could't be found"); StartCoroutine(SpawnEnemiesNow()); }
void Start() { playerCurrentWeapon = Interface.Find<IPlayerCurrentWeapon>(interfaceProvider); if (playerCurrentWeapon == null) Debug.LogError("The script does not contain an interface called, \"IPlayerCurrentWeapon\""); spawnResults = new List<SpawnResult>(); StartCoroutine(SpawnEnemiesNow()); }
void Start() { playerCurrentWeapon = Interface.Find<IPlayerCurrentWeapon>(FindObjectOfType<Player>().gameObject); if (playerCurrentWeapon == null) Debug.LogError("The script does not contain an interface called, \"IPlayerCurrentWeapon\""); spawnResults = new List<SpawnResultBush>(); StartCoroutine(SpawnBushesNow()); }