Moved CrewManager & HireManager to a separate single player GameMode, bleeding decreases health

This commit is contained in:
Regalis
2015-06-16 22:53:02 +03:00
parent d668ad0ede
commit 2ef92c4af0
22 changed files with 656 additions and 283 deletions

View File

@@ -148,8 +148,13 @@ namespace Subsurface
{
WayPoint spawnPoint = WayPoint.GetRandom(WayPoint.SpawnType.Human);
Character.Controlled = new Character("Content/Characters/Human/human.xml", (spawnPoint == null) ? Vector2.Zero : spawnPoint.SimPosition);
if (Game1.GameSession != null) Game1.GameSession.crewManager.AddCharacter(Character.Controlled);
if (Game1.GameSession != null) Game1.GameSession.crewManager.SelectCharacter(Character.Controlled);
if (Game1.GameSession != null)
{
SinglePlayerMode mode = Game1.GameSession.gameMode as SinglePlayerMode;
if (mode == null) break;
mode.crewManager.AddCharacter(Character.Controlled);
mode.crewManager.SelectCharacter(Character.Controlled);
}
}
else
{