aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/TutorialManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS_TheReturn/TutorialManager.cs')
-rw-r--r--ShiftOS_TheReturn/TutorialManager.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/ShiftOS_TheReturn/TutorialManager.cs b/ShiftOS_TheReturn/TutorialManager.cs
index 1d8943e..2145977 100644
--- a/ShiftOS_TheReturn/TutorialManager.cs
+++ b/ShiftOS_TheReturn/TutorialManager.cs
@@ -12,22 +12,54 @@ namespace ShiftOS.Engine
public static void RegisterTutorial(ITutorial tut)
{
+ IsInTutorial = false;
_tut = tut;
_tut.OnComplete += (o, a) =>
{
SaveSystem.CurrentSave.StoryPosition = 2;
+ IsInTutorial = false;
};
}
+ public static bool IsInTutorial
+ {
+ get; private set;
+ }
+
+ public static int Progress
+ {
+ get
+ {
+ return _tut.TutorialProgress;
+ }
+ }
+
public static void StartTutorial()
{
+ IsInTutorial = true;
_tut.Start();
}
}
public interface ITutorial
{
+ int TutorialProgress { get; set; }
void Start();
event EventHandler OnComplete;
}
+
+ public class TutorialLockAttribute : Attribute
+ {
+ public TutorialLockAttribute(int progress)
+ {
+ Progress = progress;
+ }
+
+ public TutorialLockAttribute() : this(0)
+ {
+
+ }
+
+ public int Progress { get; private set; }
+ }
}