void checkCollision() { if (CoinSprite.activeSelf == false) { CoinSprite.SetActive(true); } else if (fuelCar.activeSelf == false) { fuelCar.SetActive(true); } else if (obstacle1.activeSelf == false) { obstacle1.SetActive(true); } else if (enemy1.activeSelf == false) { enemy1.SetActive(true); } else if (enemy2.activeSelf == false) { enemy2.SetActive(true); } else if (enemy3.activeSelf == false) { enemy3.SetActive(true); } else if (truck2.activeSelf == false) { truck2.SetActive(true); } else if (CoinSprite2.activeSelf == false) { CoinSprite2.SetActive(true); } else if (fuel1.activeSelf == false) { fuel1.SetActive(true); } else if (copCar.activeSelf == false) { copCar.SetActive(true); } Debug.Log("COP Self: " + copCar.activeSelf); }
void bringBoss() { scoreCount += 10; setScore(); CoinSprite.SetActive(false); CoinSprite2.SetActive(false); obstacle1.SetActive(false); fuelCar.SetActive(false); fuel1.SetActive(false); enemy1.SetActive(false); enemy2.SetActive(false); enemy3.SetActive(false); copCar.SetActive(false); truck2.SetActive(false); // Background2 bg2= GetComponent<Background2>(); // bg2.scrollSpeed = 0f; boss.SetActive(true); }