コード例 #1
0
 private void Loadme(SaveGameData savegame)
 {
     if (savegame != null &&
         gameObject.scene.buildIndex == savegame.currentLevel)
     {
         isActive = savegame.FindObjectById(gameObject.name) == null;
     }
 }
コード例 #2
0
 private void Saveme(SaveGameData savegame)
 {
     if (savegame.FindObjectById(gameObject.name) == null && !isActive)
     {
         SaveObject saveObject = new SaveObject();
         saveObject.Id  = gameObject.name;
         saveObject.Tag = gameObject.tag;
         savegame.saveObject.Add(saveObject);
     }
 }
コード例 #3
0
 private void Saveme(SaveGameData savegame)
 {
     if (savegame.FindObjectById(gameObject.name) == null &&
         doorAnimator.GetBool("isOpenTriggered"))
     {
         SaveObject saveObject = new SaveObject();
         saveObject.Id  = gameObject.name;
         saveObject.Tag = gameObject.tag;
         savegame.saveObject.Add(saveObject);
     }
 }
コード例 #4
0
 private void Loadme(SaveGameData savegame)
 {
     if (savegame != null &&
         gameObject.scene.buildIndex == savegame.currentLevel)
     {
         SaveObject saveObject = savegame.FindObjectById(gameObject.name);
         if (saveObject != null)
         {
             HandleDoorSwitch(true);
         }
     }
 }
コード例 #5
0
 private void Loadme(SaveGameData savegame)
 {
     if (savegame != null &&
         gameObject.scene.buildIndex == savegame.currentLevel)
     {
         SaveObject saveObject = savegame.FindObjectById(gameObject.name);
         switch ((saveObject != null) ? saveObject.Tag : "")
         {
         case "barrel":
             transform.position = saveObject.Position;
             break;
         }
     }
 }
コード例 #6
0
    private void Saveme(SaveGameData savegame)
    {
        SaveObject saveObject = savegame.FindObjectById(gameObject.name);

        if (saveObject == null)
        {
            saveObject = new SaveObject();
            UpdateSaveObject(saveObject);
            savegame.saveObject.Add(saveObject);
        }
        else
        {
            UpdateSaveObject(saveObject);
        }
    }