Exemplo n.º 1
0
    void DisplayNextInstruction(int currentStep)
    {
        switch (currentStep)
        {
        case 2:
            step1.SetActive(false);
            step2.SetActive(true);
            break;

        case 3:
            step2.SetActive(false);
            step3.SetActive(true);
            break;

        case 4:
            step3.SetActive(false);
            step4.SetActive(true);
            break;

        case 5:
            step4.SetActive(false);
            step5.SetActive(true);
            break;

        case 6:
            step5.SetActive(false);
            step6.SetActive(true);
            break;

        case 7:
            step6.SetActive(false);
            step7.SetActive(true);
            break;

        case 8:
            step7.SetActive(false);
            step8.SetActive(true);
            break;

        case 9:
            gameObject.SetActive(false);
            CampaignData.SetAbilityInstructionsState(true);
            SaveLoad.Save();
            break;
        }
        passiveDismissDelay = 0f;
    }
Exemplo n.º 2
0
    public static void Load()
    {
        if (File.Exists(Application.persistentDataPath + "/gameSave.dat"))
        {
            //Debug.Log("Loading...");

            BinaryFormatter data     = new BinaryFormatter();
            FileStream      file     = File.Open(Application.persistentDataPath + "/gameSave.dat", FileMode.Open);
            Hashtable       saveData = (Hashtable)data.Deserialize(file);
            file.Close();

            //-----------------------Loading Stats---------------------------------
            CampaignData.SetFinishedTutorial((bool)saveData["finishedTutorial"]);
            CampaignData.SetAbilityInstructionsState((bool)saveData["viewedAbilityMatchInstructions"]);
            CampaignData.SetAllLevelsDictionary((Dictionary <string, LevelStats>)saveData["allBoardLevels"]);
            CampaignData.SetAllHeroBoardsDictionary((Dictionary <HeroManager.Hero, LevelStats>)saveData["heroesUnlocked"]);
            CampaignData.SetAllBoardStarCounts((Dictionary <string, int>)saveData["boardStarCounts"]);
            //-----------------------Done Loading----------------------------------
        }
        else
        {
            Save();
        }
    }