I am following this tutorial: https://www.youtube.com/watch?v=1QfxdUpVh5I I am also getting this error: "cs(27,2): error CS1513: } expected" This is my first game and I am fairly new to this so please be patient. Here is the code
{
public float timeBtwAttack;
public float startTimeBtwAttack;
void Update()
{
if(timeBtwAttack <= 0)
{
if (Input.GetKey(KeyCode.Space))
{
Collider2D[] enemiesToDamage = Physics2D.OverlapCircleAll(attackPos.position, attackRange, whatIsEnemies);
for (int i = 0; i < enemiesToDamage.Length; i++)
{
enemiesToDamage[i].GetComponent<Enemy>().TakeDamage(damage);
}
}
}
timeBtwAttack = startTimeBtwAttack;
} else {
}
Aucun commentaire:
Enregistrer un commentaire