Structure
This commit is contained in:
@@ -1,21 +1,32 @@
|
|||||||
package io.anuke.mindustry.game;
|
package io.anuke.mindustry.game;
|
||||||
|
|
||||||
|
import io.anuke.arc.*;
|
||||||
|
import io.anuke.arc.math.*;
|
||||||
|
|
||||||
/** Handles tutorial state. */
|
/** Handles tutorial state. */
|
||||||
public class Tutorial{
|
public class Tutorial{
|
||||||
private TutorialStage stage = TutorialStage.values()[0];
|
public TutorialStage stage = TutorialStage.values()[0];
|
||||||
|
|
||||||
|
/** Resets tutorial state. */
|
||||||
public void reset(){
|
public void reset(){
|
||||||
stage = TutorialStage.values()[0];
|
stage = TutorialStage.values()[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Goes on to the next tutorial step. */
|
/** Goes on to the next tutorial step. */
|
||||||
public void next(){
|
public void next(){
|
||||||
|
stage = TutorialStage.values()[Mathf.clamp(stage.ordinal() + 1, 0, TutorialStage.values().length)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public enum TutorialStage{
|
public enum TutorialStage{
|
||||||
intro;
|
intro;
|
||||||
|
|
||||||
|
public final String text;
|
||||||
|
|
||||||
|
TutorialStage(){
|
||||||
|
text = Core.bundle.get("tutorial." + name());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user