mirror of
https://github.com/guezoloic/L3-racing-game.git
synced 2026-03-31 12:21:34 +00:00
40 lines
666 B
Java
40 lines
666 B
Java
public class State
|
|
{
|
|
public static enum DriveMode
|
|
{
|
|
// <CARBURANT PERDU> <PREMIER INTERVAL> <SECOND INTERVAL>
|
|
NORMAL(2, 1, 6);
|
|
|
|
private int carbUsed;
|
|
private int[] interval;
|
|
|
|
private DriveMode(int carbUsed, int fInterval, int sInterval)
|
|
{
|
|
this.carbUsed = carbUsed;
|
|
interval = new int[] {fInterval, sInterval};
|
|
}
|
|
|
|
public int getConsumption()
|
|
{
|
|
return carbUsed;
|
|
}
|
|
|
|
public int[] getInterval()
|
|
{
|
|
return interval;
|
|
}
|
|
}
|
|
|
|
private static DriveMode current = DriveMode.NORMAL;
|
|
|
|
public static DriveMode get()
|
|
{
|
|
return current;
|
|
}
|
|
|
|
public static void set(DriveMode DriveMode)
|
|
{
|
|
current = DriveMode;
|
|
}
|
|
}
|