From 1cb01af77bcb4c5ee872386322e023813935275d Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 4 Aug 2019 08:13:16 -0400 Subject: [PATCH] Structure --- core/src/io/anuke/mindustry/game/Tutorial.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/core/src/io/anuke/mindustry/game/Tutorial.java b/core/src/io/anuke/mindustry/game/Tutorial.java index 0655257ac0..3dba893fba 100644 --- a/core/src/io/anuke/mindustry/game/Tutorial.java +++ b/core/src/io/anuke/mindustry/game/Tutorial.java @@ -1,21 +1,32 @@ package io.anuke.mindustry.game; +import io.anuke.arc.*; +import io.anuke.arc.math.*; + /** Handles tutorial state. */ public class Tutorial{ - private TutorialStage stage = TutorialStage.values()[0]; + public TutorialStage stage = TutorialStage.values()[0]; + /** Resets tutorial state. */ public void reset(){ stage = TutorialStage.values()[0]; } /** Goes on to the next tutorial step. */ public void next(){ - + stage = TutorialStage.values()[Mathf.clamp(stage.ordinal() + 1, 0, TutorialStage.values().length)]; } - public enum TutorialStage{ intro; + + public final String text; + + TutorialStage(){ + text = Core.bundle.get("tutorial." + name()); + } + + } }