if(selectedCar==0){
cars[0].SetActive(true);
cars[1].SetActive(false);
cars[2].SetActive(false);
cars[3].SetActive(false);
cars[4].SetActive(false);
}
else if (selectedCar==1){
cars[0].SetActive(false);
cars[1].SetActive(true);
cars[2].SetActive(false);
cars[3].SetActive(false);
cars[4].SetActive(false);
}
else if (selectedCar==2){
cars[0].SetActive(false);
cars[1].SetActive(false);
cars[2].SetActive(true);
cars[3].SetActive(false);
cars[4].SetActive(false);
}
else if (selectedCar==3){
cars[0].SetActive(false);
cars[1].SetActive(false);
cars[2].SetActive(false);
cars[3].SetActive(true);
cars[4].SetActive(false);
}
else if (selectedCar==4){
cars[0].SetActive(false);
cars[1].SetActive(false);
cars[2].SetActive(false);
cars[3].SetActive(false);
cars[4].SetActive(true);
}
Toplam 1 cevap
cars[0].SetActive(false);
cars[1].SetActive(false);
cars[2].SetActive(false);
cars[3].SetActive(false);
cars[4].SetActive(false);
switch(selectedCar)
{
case 0: cars[0].SetActive(true); break;
case 1: cars[1].SetActive(true); break;
case 2: cars[2].SetActive(true); break;
case 3: cars[3].SetActive(true); break;
case 4: cars[4].SetActive(true); break;
}