I'm so nooby at unity. I'm trying to make a flappy bird clone and ı wanna fasten pipes which are coming toward bird. ı can fasten them but in game scene there are still slower pipes and it doesnt seem good how can ı solve this problem? Sorry for my English its not my mother tongue.
void Update()
{
if (firstTap && KlonlamaBirKereCalissin)
{
KlonlamaBirKereCalissin = false;
InvokeRepeating(nameof(PipeClonin), 1, 6f); ==> in first tap it start to cloning
}
if (score > 10 && KlonlamaBirKereCalissin10) ==> checking if score 10 and if the answer is yes i cancell earlier invoke and started faster one
{
// SlowPipes = GameObject.FindGameObjectsWithTag("Pipes"); ==> in here ı tried to faster last two slower pipes but ıt was wrong cos its update func and last two pipes are changing so the result is changing too
// SlowPipes[2].GetComponent<PipeMove>().PipeSpeed = 1.5f;
// SlowPipes[3].GetComponent<PipeMove>().PipeSpeed = 1.5f;
CancelInvoke(nameof(PipeClonin));
InvokeRepeating(nameof(PipeClonin), 1f, 5f);
KlonlamaBirKereCalissin10 = false;
pipeMoveScript.PipeSpeed = 1.5f;