Esempio n. 1
0
        void OnTriggerEnter(Collider cld)
        {
            var hero = cld.gameObject.GetComponent <Hero> ();

            if (hero == null)
            {
                return;
            }
            Debug.Log("Granting MagnetImpact power to the Hero!" + (CurrentGameSaveData.Data.HasAcquiredMagnetImpact ? " (was already acquired)" : ""));
            StartCoroutine(ShowExplanations());
            CurrentGameSaveData.Data.HasAcquiredMagnetImpact = true;
            CurrentGameSaveData.Save();
        }
Esempio n. 2
0
 // NOTE: Loads the game
 // If "isNew" it loads a new game, else it loads last game saved
 public void LoadGame(bool isNew)
 {
     gameStarted = true;
     ResumeGame();
     if (isNew)
     {
         CurrentGameSaveData.NewGame();
     }
     else
     {
         CurrentGameSaveData.LoadGame();
     }
     GameState.Resume();
 }
Esempio n. 3
0
        void OnTriggerEnter(Collider cld)
        {
            var hero = cld.gameObject.GetComponent <Hero> ();

            if (hero == null)
            {
                return;
            }
            var prevID = CurrentGameSaveData.Data.LastCheckpoint;

            Debug.Log(
                "The last Checkpoint is now \"" + gameObject.name + "\" (ID:" + ID + " )."
                + " The previous one was \"" + All[prevID].gameObject.name + "\" (ID: " + prevID + ")."
                );
            CurrentGameSaveData.Data.LastCheckpoint = ID;
            CurrentGameSaveData.Save();
        }