- Joined
- Apr 16, 2023
- Messages
- 1
- Reaction score
- 0
I'm not sure if this is correct but this is the script for a flappy bird pipe spawner can anyone see any missing commas.
{
spawnknife();
}
// Update is called once per frame
void Update()
{
if (timer < spawnRate)
{
timer = timer + Time.deltaTime;
}
else
{
spawnknife();
timer = 0;
}
}
void spawnknife()
{
float lowestPoint = transform.position.y - heightOffset;
float highestPoint = transform.position.y + heightOffset;
Instantiate(Knife, new Vector3(transform.position.x, Random.Range(lowestPoint, highestPoint), 1), transform.rotation);
}
}
{
spawnknife();
}
// Update is called once per frame
void Update()
{
if (timer < spawnRate)
{
timer = timer + Time.deltaTime;
}
else
{
spawnknife();
timer = 0;
}
}
void spawnknife()
{
float lowestPoint = transform.position.y - heightOffset;
float highestPoint = transform.position.y + heightOffset;
Instantiate(Knife, new Vector3(transform.position.x, Random.Range(lowestPoint, highestPoint), 1), transform.rotation);
}
}