Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        //PlayerCharacterSheet.LoadFromDisk("Save1.txt")
        string dataPath = Path.Combine(Application.persistentDataPath, SaveFile1);

        if (!File.Exists(dataPath))
        {
            PlayerCharacterSheet.SaveToDisk(new PlayerCharacterSheet(), dataPath);
        }
        Character1 = PlayerCharacterSheet.LoadFromDisk(SaveFile1);

        dataPath = Path.Combine(Application.persistentDataPath, SaveFile2);
        if (!File.Exists(dataPath))
        {
            PlayerCharacterSheet.SaveToDisk(new PlayerCharacterSheet(), dataPath);
        }
        Character2 = PlayerCharacterSheet.LoadFromDisk(SaveFile2);

        dataPath = Path.Combine(Application.persistentDataPath, SaveFile3);
        if (!File.Exists(dataPath))
        {
            PlayerCharacterSheet.SaveToDisk(new PlayerCharacterSheet(), dataPath);
        }

        Character3 = PlayerCharacterSheet.LoadFromDisk(SaveFile3);
    }
Ejemplo n.º 2
0
 public PlayerCharacterSheet GetPlayer()
 {
     if (InitializePlayer)
     {
         Transform EngineRoomManager = GameObject.Find("EngineRoomMissionManager").transform;
         CharacterSheetLocation = EngineRoomManager.GetComponent <MissionManager>().player1CharacterSheetPath;
         APlayer          = PlayerCharacterSheet.LoadFromDisk(CharacterSheetLocation);
         InitializePlayer = false;
     }
     return(APlayer);
 }
Ejemplo n.º 3
0
 public void SetCharacterSheet(string SaveFileName)
 {
     ThisPlayer = PlayerCharacterSheet.LoadFromDisk(SaveFileName);
     ThisGameGrid.SetGridCellTypeStateAndAttendentVFX();
     this.health = this.MaxHealth();
 }