Load() public static method

public static Load ( int num ) : void
num int
return void
Example #1
0
    void Start()
    {
        string locationName = PlayerPrefs.GetString("locationName", "Castle1");

        foreach (SuperTiled2Unity.SuperMap prefab in locationPrefabs)
        {
            if (prefab.name.Equals(locationName))
            {
                map = Instantiate <SuperTiled2Unity.SuperMap>(prefab, Vector3.zero, Quaternion.identity);
                movementHandler.grid = map.GetComponentInChildren <Grid>();
                break;
            }
        }
        saveLoadHandler.Load();
    }
Example #2
0
 void Start()
 {
     warpTextTimer       = warpTextDelay;
     GravityWarp.gravity = "D";
     button.GetComponent <UnityEngine.UI.Button>().onClick.AddListener(() => { Load(); });
     if (name == "button_resume")
     {
         SaveLoadHandler.Load();
         if (SaveLoadHandler.playerScene != null && SaveLoadHandler.playerScene != "credits")
         {
             scene = SaveLoadHandler.playerScene;
         }
         else
         {
             scene         = "Story";
             Info.gameTime = 0;
         }
     }
 }