Browse Source

Removed save game stuff from Game class

master
chrisgregan 10 years ago
parent
commit
d7e7ddd631
  1. 32
      Assets/Fungus/Legacy/Scripts/Game.cs
  2. BIN
      Assets/Shuttle/ShuttleGame.unity

32
Assets/Fungus/Legacy/Scripts/Game.cs

@ -38,12 +38,6 @@ namespace Fungus
[Tooltip("Currently active Dialog object used to display character text and menus.")]
public Dialog dialog;
/**
* Loading image displayed when loading a scene using MoveToScene() command.
*/
[Tooltip("Loading image displayed when loading a scene using MoveToScene() command.")]
public Texture2D loadingImage;
float autoHideButtonTimer;
static Game instance;
@ -115,31 +109,5 @@ namespace Fungus
return false;
}
/**
* Save the current game variables to persistant storage using a save game name.
* Stores the currently loaded scene name so that Game.LoadGame() can automatically move to the appropriate scene.
*/
public void SaveGame(string saveName = "_fungus")
{
GlobalVariables.SetString("_scene", Application.loadedLevelName);
GlobalVariables.Save(saveName);
}
/**
* Loads the current game state from persistant storage using a save game name.
* This will cause the scene specified in the "_scene" string to be loaded.
* Each scene in your game should contain the necessary code to restore the current game state based on saved data.
* @param saveName The name of the saved game data.
*/
public void LoadGame(string saveName = "_fungus")
{
GlobalVariables.Load(saveName);
string sceneName = GlobalVariables.GetString("_scene");
if (sceneName.Length > 0)
{
// MoveToScene(sceneName);
}
}
}
}

BIN
Assets/Shuttle/ShuttleGame.unity

Binary file not shown.
Loading…
Cancel
Save