WIP level position syncing, job prefabs and assigning jobs to characters

This commit is contained in:
Regalis11
2015-07-06 21:17:32 +03:00
parent d836a99515
commit 55b00e5ed0
13 changed files with 309 additions and 144 deletions
+18 -6
View File
@@ -10,15 +10,15 @@ namespace Subsurface
{
enum Tabs { Main = 0, NewGame = 1, LoadGame = 2, JoinServer = 3 }
GUIFrame[] menuTabs;
GUIListBox mapList;
private GUIFrame[] menuTabs;
private GUIListBox mapList;
GUIListBox saveList;
private GUIListBox saveList;
GUITextBox nameBox;
GUITextBox ipBox;
private GUITextBox nameBox;
private GUITextBox ipBox;
Game1 game;
private Game1 game;
int selectedTab;
@@ -87,6 +87,18 @@ namespace Subsurface
new GUITextBlock(new Rectangle(0, 0, 0, 30), "Load Game", Color.Transparent, Color.Black, Alignment.CenterX, null, menuTabs[(int)Tabs.LoadGame]);
if (!Directory.Exists(SaveUtil.SaveFolder))
{
DebugConsole.ThrowError("Save folder ''"+SaveUtil.SaveFolder+" not found! Attempting to create a new folder");
try
{
Directory.CreateDirectory(SaveUtil.SaveFolder);
}
catch (Exception e)
{
DebugConsole.ThrowError("Failed to create the folder ''"+SaveUtil.SaveFolder+"''!", e);
}
}
string[] saveFiles = Directory.GetFiles(SaveUtil.SaveFolder, "*.save");