void Start() { theTrack = FindObjectOfType <trackMove>(); coin = FindObjectOfType <CoinsMaker>(); sign = FindObjectOfType <SignPool>(); Enemy = FindObjectOfType <EnemyMoves>(); //Plane = FindObjectOfType<AirPlanes>(); timer = 4.2f; timeCoin = 5f; /// walls Rand = Random.Range(2.45f, 3f); timer = Rand; if (scoreChange > 300) { timer = Rand / 1.2f; } if (scoreChange > 550) { timer = Rand / 1.4f; } if (scoreChange > 800) { timer = Rand / 1.5f; } if (scoreChange > 1040) { timer = Rand / 1.6f; } if (scoreChange > 1220) { timer = Rand / 1.7f; } /// InvokeRepeating("CallWalls", timer, timer); timer2 = Random.Range(8f, 15f); InvokeRepeating("CallBullon", timer2, timer2); }
void Start() { //AnimSign1 = GetComponent<Animator>(); sign = FindObjectOfType <SignPool>(); Hit_Sign_Road = GameObject.Find("hit_Sign_road").GetComponent <AudioSource>(); }