Ejemplo n.º 1
0
    public void Load(string name)
    {
        SaveData saveData = SaveFormatter.Load(name);

        WorldStreamer.instance.LoadFromFile(saveData.playerData);

        // Global Loading
        GlobalVar.instance.Load(saveData.globalData);

        // Puzzle Loading
        PuzzleManager.instance.Load(saveData.puzzleData);

        // Player loading
        StartCoroutine(GetPlayerLoader(saveData.playerData));
    }
Ejemplo n.º 2
0
        private void buttonLoadGame_Click(object sender, EventArgs e)
        {
            double newBalanceAmount = SaveFormatter.Load();

            if (newBalanceAmount != 0)
            {
                GameForm gameForm = new GameForm(newBalanceAmount);
                gameForm.Show();
                gameForm.StartPosition = FormStartPosition.Manual;
                gameForm.Location      = this.Location;
                this.Hide();
            }
            else
            {
                MessageBox.Show("Nepodařilo se načíst hru, prosím vytvořte novou.");
            }
        }