Client LuaCsForBarotrauma
TutorialCompleteAction.cs
1 namespace Barotrauma
2 {
7  {
8  private bool isFinished;
9 
10  public TutorialCompleteAction(ScriptedEvent parentEvent, ContentXElement element) : base(parentEvent, element) { }
11 
12  public override void Update(float deltaTime)
13  {
14  if (isFinished) { return; }
15 
16 #if CLIENT
17  if (GameMain.GameSession?.GameMode is TutorialMode tutorialMode)
18  {
19  tutorialMode.Tutorial?.Complete();
20  }
21 #endif
22  isFinished = true;
23  }
24 
25  public override bool IsFinished(ref string goToLabel)
26  {
27  return isFinished;
28  }
29 
30  public override void Reset()
31  {
32  isFinished = false;
33  }
34  }
35 }
static GameSession?? GameSession
Definition: GameMain.cs:88
Completes the tutorial. Only valid in tutorial events.
TutorialCompleteAction(ScriptedEvent parentEvent, ContentXElement element)
override bool IsFinished(ref string goToLabel)
Has the action finished.
override void Update(float deltaTime)