Saving (wip), statuseffect refactoring, multiple character faces

This commit is contained in:
Regalis
2015-06-12 16:56:51 +03:00
parent 270efd77e0
commit 566d54197a
35 changed files with 640 additions and 268 deletions
+3 -2
View File
@@ -96,7 +96,7 @@ namespace Subsurface
{
base.Select();
Map.Unload();
//Map.Unload();
UpdateCharacterLists();
@@ -222,7 +222,8 @@ namespace Subsurface
private bool StartShift(GUIButton button, object selection)
{
Map.Load(Game1.GameSession.SaveFile);
//Map.Load(Game1.GameSession.SaveFile);
Game1.GameSession.StartShift();
+15 -18
View File
@@ -55,23 +55,20 @@ namespace Subsurface
new GUITextBlock(new Rectangle(0, 30, 0, 30), "Selected map:", Color.Transparent, Color.Black, Alignment.Left, menuTabs[(int)Tabs.NewGame]);
mapList = new GUIListBox(new Rectangle(0, 60, 200, 400), Color.White, menuTabs[1]);
//string[] mapFilePaths = Map.GetMapFilePaths();
//if (mapFilePaths!=null)
//{
foreach (Map map in Map.SavedMaps)
{
GUITextBlock textBlock = new GUITextBlock(
new Rectangle(0, 0, 0, 25),
map.Name,
GUI.style,
Alignment.Left,
Alignment.Left,
mapList);
textBlock.Padding = new Vector4(10.0f, 0.0f, 0.0f, 0.0f);
textBlock.UserData = map;
}
if (Map.SavedMaps.Count > 0) mapList.Select(Map.SavedMaps[0]);
//}
foreach (Map map in Map.SavedMaps)
{
GUITextBlock textBlock = new GUITextBlock(
new Rectangle(0, 0, 0, 25),
map.Name,
GUI.style,
Alignment.Left,
Alignment.Left,
mapList);
textBlock.Padding = new Vector4(10.0f, 0.0f, 0.0f, 0.0f);
textBlock.UserData = map;
}
if (Map.SavedMaps.Count > 0) mapList.Select(Map.SavedMaps[0]);
button = new GUIButton(new Rectangle(0, 0, 100, 30), "Start", GUI.style, Alignment.Right | Alignment.Bottom, menuTabs[(int)Tabs.NewGame]);
button.OnClicked = StartGame;
@@ -150,7 +147,7 @@ namespace Subsurface
if (selectedMap == null) return false;
Game1.GameSession = new GameSession(selectedMap.FilePath, true, TimeSpan.Zero);
Game1.GameSession = new GameSession(selectedMap, TimeSpan.Zero);
Game1.LobbyScreen.Select();
+3 -2
View File
@@ -6,6 +6,7 @@ using Subsurface.Networking;
using FarseerPhysics;
using FarseerPhysics.Factories;
using FarseerPhysics.Dynamics;
using System.IO;
namespace Subsurface
{
@@ -472,7 +473,7 @@ namespace Subsurface
}
else
{
msg.Write(selectedMap.Name);
msg.Write(Path.GetFileName(selectedMap.FilePath));
msg.Write(selectedMap.MapHash.MD5Hash);
}
@@ -502,7 +503,7 @@ namespace Subsurface
else
{
mapList.Select(map);
map.Load();
//map.Load();
return true;
}
}