diff --git a/.vs/Subsurface_Solution/v14/.suo b/.vs/Subsurface_Solution/v14/.suo
index 33c17251c..4eb89efd5 100644
Binary files a/.vs/Subsurface_Solution/v14/.suo and b/.vs/Subsurface_Solution/v14/.suo differ
diff --git a/Subsurface/Barotrauma.csproj b/Subsurface/Barotrauma.csproj
index b6028af16..35819c10b 100644
--- a/Subsurface/Barotrauma.csproj
+++ b/Subsurface/Barotrauma.csproj
@@ -121,8 +121,9 @@
-
+
+
@@ -200,8 +201,8 @@
-
-
+
+
@@ -239,7 +240,7 @@
-
+
diff --git a/Subsurface/Content/Items/Weapons/railgun.xml b/Subsurface/Content/Items/Weapons/railgun.xml
index 5a4579d94..449b464bd 100644
--- a/Subsurface/Content/Items/Weapons/railgun.xml
+++ b/Subsurface/Content/Items/Weapons/railgun.xml
@@ -6,7 +6,7 @@
linkable="true"
pickdistance="150">
-
+
> Coroutines = new List>();
+ public static float DeltaTime;
+
// Starting a coroutine just means adding an enumerator to the list.
// You might also want to be able to stop coroutines or delete them,
// which might mean putting them into a dictionary
@@ -42,6 +44,8 @@ namespace Barotrauma
// Updating just means stepping through all the coroutines
public static void Update(float deltaTime)
{
+ DeltaTime = deltaTime;
+
for (int i = Coroutines.Count-1; i>=0; i--)
{
if (Coroutines[i].Current != null)
diff --git a/Subsurface/Source/GUI/GUI.cs b/Subsurface/Source/GUI/GUI.cs
index 7fde62533..45bc4b489 100644
--- a/Subsurface/Source/GUI/GUI.cs
+++ b/Subsurface/Source/GUI/GUI.cs
@@ -20,12 +20,12 @@ namespace Barotrauma
{
public static GUIStyle Style;
- static Texture2D t;
+ private static Texture2D t;
public static SpriteFont Font, SmallFont, LargeFont;
private static Sprite cursor;
- private static GraphicsDevice graphicsDevice;
+ private static GraphicsDevice graphicsDevice;
private static List messages = new List();
@@ -34,6 +34,8 @@ namespace Barotrauma
private static bool pauseMenuOpen;
private static GUIFrame pauseMenu;
+ public static Color ScreenOverlayColor;
+
public static void Init(ContentManager content)
{
GUI.Font = ToolBox.TryLoadFont("SpriteFont1", content);
@@ -60,8 +62,7 @@ namespace Barotrauma
// create 1x1 texture for line drawing
t = new Texture2D(graphicsDevice, 1, 1);
- t.SetData(
- new Color[] { Color.White });// fill the texture with white
+ t.SetData(new Color[] { Color.White });// fill the texture with white
Style = new GUIStyle("Content/UI/style.xml");
}
@@ -294,6 +295,14 @@ namespace Barotrauma
public static void Draw(float deltaTime, SpriteBatch spriteBatch, Camera cam)
{
+ if (ScreenOverlayColor.A>0.0f)
+ {
+ DrawRectangle(
+ spriteBatch,
+ new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight),
+ ScreenOverlayColor, true);
+ }
+
spriteBatch.DrawString(Font,
"FPS: " + (int)GameMain.FrameCounter.AverageFramesPerSecond,
new Vector2(10, 10), Color.White);
diff --git a/Subsurface/Source/GameSession/GameModes/SinglePlayerMode.cs b/Subsurface/Source/GameSession/GameModes/SinglePlayerMode.cs
index 46928b823..77bf3e58d 100644
--- a/Subsurface/Source/GameSession/GameModes/SinglePlayerMode.cs
+++ b/Subsurface/Source/GameSession/GameModes/SinglePlayerMode.cs
@@ -234,10 +234,25 @@ namespace Barotrauma
private bool EndShift(GUIButton button, object obj)
{
- End("");
+ var cinematic = new TransitionCinematic(Submarine.Loaded, GameMain.GameScreen.Cam);
+
+ CoroutineManager.StartCoroutine(EndCinematic(cinematic));
+
return true;
}
+ private IEnumerable