From 33edc6a21175f16aae06fc4d3d327266a456eeee Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 18 Jan 2017 10:01:37 -0500 Subject: 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. --- ShiftOS_TheReturn/TutorialManager.cs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'ShiftOS_TheReturn/TutorialManager.cs') 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; } + } } -- cgit v1.2.3