Improved submarine movement (buoyancy & drag), engine and "navigation terminal", new map, optimized levels (less vertices and physics bodies)

This commit is contained in:
Regalis
2015-06-29 02:00:27 +03:00
parent 9237a9efe2
commit 004608acd8
43 changed files with 1199 additions and 527 deletions
+7 -4
View File
@@ -107,14 +107,17 @@ namespace Subsurface
GUIComponent characterBlock = listBox.GetChild(killedCharacter) as GUIComponent;
if (characterBlock != null) characterBlock.Color = Color.DarkRed * 0.5f;
if (characters.Find(c => !c.IsDead)==null)
{
Game1.GameSession.EndShift(null, null);
}
//if (characters.Find(c => !c.IsDead)==null)
//{
// Game1.GameSession.EndShift(null, null);
//}
}
public void StartShift()
{
listBox.ClearChildren();
characters.Clear();
foreach (CharacterInfo ci in characterInfos)
{
WayPoint randomWayPoint = WayPoint.GetRandom(WayPoint.SpawnType.Human);
+1 -1
View File
@@ -137,7 +137,7 @@ namespace Subsurface
if (endMessage != "" || this.endMessage == null) this.endMessage = endMessage;
Game1.GameSession.EndShift(null, null);
Game1.GameSession.EndShift(endMessage);
}
public static void Init()
+5 -8
View File
@@ -113,8 +113,7 @@ namespace Subsurface
public void StartShift(TimeSpan duration, Level level)
{
if (Submarine.Loaded != submarine) submarine.Load();
submarine.Load();
level.Generate(submarine==null ? 100.0f : Math.Max(Submarine.Borders.Width, Submarine.Borders.Height));
@@ -133,19 +132,17 @@ namespace Subsurface
if (level!=null)
{
submarine.Move(level.StartPosition - submarine.Center, 1.0f);
submarine.SetPosition(level.StartPosition);
}
//crewManager.StartShift();
taskManager.StartShift(scriptedEventCount);
}
public bool EndShift(GUIButton button, object obj)
public void EndShift(string endMessage)
{
if (Game1.Server!=null)
{
string endMessage = gameMode.EndMessage;
{
Game1.Server.EndGame(endMessage);
}
@@ -159,7 +156,7 @@ namespace Subsurface
taskManager.EndShift();
//gameMode.End();
return true;
//return true;
}
+1 -1
View File
@@ -156,7 +156,7 @@ namespace Subsurface
Character.characterList.RemoveAt(i);
}
Game1.GameSession.EndShift(null, null);
Game1.GameSession.EndShift("");
return true;
}