Example #1
0
 public void NextFuel()
 {
     CurrentFuelIndex += 1;
     if (CurrentFuelIndex >= Fuels.Count())
     {
         CurrentFuelIndex = 0;
     }
     Fuel = Fuels[CurrentFuelIndex].name;
 }
Example #2
0
 public void PrevFuel()
 {
     CurrentFuelIndex -= 1;
     if (CurrentFuelIndex < 0)
     {
         CurrentFuelIndex = Fuels.Count() - 1;
     }
     Fuel = Fuels[CurrentFuelIndex].name;
 }