Client LuaCsForBarotrauma
BarotraumaShared/SharedSource/GameSession/GameModes/GameMode.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 
5 namespace Barotrauma
6 {
7  partial class GameMode
8  {
9  public static List<GameModePreset> PresetList = new List<GameModePreset>();
10 
11  protected DateTime startTime;
12 
14 
16  {
17  get { return GameMain.GameSession?.CrewManager; }
18  }
19 
20  public virtual IEnumerable<Mission> Missions
21  {
22  get { return Enumerable.Empty<Mission>(); }
23  }
24 
25  public bool IsSinglePlayer
26  {
27  get { return preset.IsSinglePlayer; }
28  }
29 
31  {
32  get { return preset.Name; }
33  }
34 
35  public virtual bool Paused
36  {
37  get { return false; }
38  }
39 
40  public virtual void UpdateWhilePaused(float deltaTime) { }
41 
43  {
44  get { return preset; }
45  }
46 
48  {
49  this.preset = preset;
50  }
51 
52  public virtual void Start()
53  {
54  startTime = DateTime.Now;
55  }
56 
57  public virtual void ShowStartMessage() { }
58 
59  public virtual void AddExtraMissions(LevelData levelData) { }
60 
61  public virtual void AddToGUIUpdateList()
62  {
63 #if CLIENT
65 #endif
66  }
67 
68  public virtual void Update(float deltaTime)
69  {
70  CrewManager?.Update(deltaTime);
71  }
72 
73  public virtual void End(CampaignMode.TransitionType transitionType = CampaignMode.TransitionType.None)
74  {
75  }
76 
77  public virtual void Remove() { }
78  }
79 }
Responsible for keeping track of the characters in the player crew, saving and loading their orders,...
static GameSession?? GameSession
Definition: GameMain.cs:88
virtual void End(CampaignMode.TransitionType transitionType=CampaignMode.TransitionType.None)
readonly LocalizedString Name
readonly bool IsSinglePlayer