aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/TutorialManager.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-01-18 10:01:37 -0500
committerMichael <[email protected]>2017-01-18 10:01:37 -0500
commit33edc6a21175f16aae06fc4d3d327266a456eeee (patch)
tree2fdd8ef3edc135a38088a2409032982538f22664 /ShiftOS_TheReturn/TutorialManager.cs
parent18f93056b7d882b4dcce4d3afacd1ba6d37d94ac (diff)
downloadshiftos_thereturn-33edc6a21175f16aae06fc4d3d327266a456eeee.tar.gz
shiftos_thereturn-33edc6a21175f16aae06fc4d3d327266a456eeee.tar.bz2
shiftos_thereturn-33edc6a21175f16aae06fc4d3d327266a456eeee.zip
Improved tutorial, win.open edit
Tutorial now goes over how to do basic things like check codepoints, buy upgrades, open windows etc. win.open now shows a list of available windows when ran with no arguments.
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; }
+ }
}