mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 23:07:33 +07:00
Added Tutorial class
This commit is contained in:
@ -35,6 +35,7 @@ import static io.anuke.mindustry.Vars.*;
|
|||||||
public class Control implements ApplicationListener{
|
public class Control implements ApplicationListener{
|
||||||
public final Saves saves;
|
public final Saves saves;
|
||||||
public final MusicControl music;
|
public final MusicControl music;
|
||||||
|
public final Tutorial tutorial;
|
||||||
|
|
||||||
private Interval timer = new Interval(2);
|
private Interval timer = new Interval(2);
|
||||||
private boolean hiscore = false;
|
private boolean hiscore = false;
|
||||||
@ -44,8 +45,8 @@ public class Control implements ApplicationListener{
|
|||||||
public Control(){
|
public Control(){
|
||||||
batch = new SpriteBatch();
|
batch = new SpriteBatch();
|
||||||
saves = new Saves();
|
saves = new Saves();
|
||||||
|
tutorial = new Tutorial();
|
||||||
music = new MusicControl();
|
music = new MusicControl();
|
||||||
data = new GlobalData();
|
|
||||||
|
|
||||||
Unit.dp.product = settings.getInt("uiscale", 100) / 100f;
|
Unit.dp.product = settings.getInt("uiscale", 100) / 100f;
|
||||||
|
|
||||||
@ -101,6 +102,7 @@ public class Control implements ApplicationListener{
|
|||||||
|
|
||||||
Events.on(ResetEvent.class, event -> {
|
Events.on(ResetEvent.class, event -> {
|
||||||
player.reset();
|
player.reset();
|
||||||
|
tutorial.reset();
|
||||||
|
|
||||||
hiscore = false;
|
hiscore = false;
|
||||||
|
|
||||||
|
21
core/src/io/anuke/mindustry/game/Tutorial.java
Normal file
21
core/src/io/anuke/mindustry/game/Tutorial.java
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package io.anuke.mindustry.game;
|
||||||
|
|
||||||
|
/** Handles tutorial state. */
|
||||||
|
public class Tutorial{
|
||||||
|
private TutorialStage stage = TutorialStage.values()[0];
|
||||||
|
|
||||||
|
public void reset(){
|
||||||
|
stage = TutorialStage.values()[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Goes on to the next tutorial step. */
|
||||||
|
public void next(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public enum TutorialStage{
|
||||||
|
intro;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user