コード例 #1
0
    public static void SaveIndexForUO(CharacteristicsHero characteristicsHero)
    {
        BinaryFormatter bf     = new BinaryFormatter();
        FileStream      stream = new FileStream(Application.dataPath + "/data/ii.sav", FileMode.Create);
        DataIndexForUO  data   = new DataIndexForUO(characteristicsHero);

        bf.Serialize(stream, data);
        stream.Close();
    }
コード例 #2
0
 public static int[] LoadIndexForUO()
 {
     if (File.Exists(Application.dataPath + "/data/ii.sav"))
     {
         BinaryFormatter bf     = new BinaryFormatter();
         FileStream      stream = new FileStream(Application.dataPath + "/data/ii.sav", FileMode.Open);
         DataIndexForUO  data   = bf.Deserialize(stream) as DataIndexForUO;
         stream.Close();
         return(data.indexForUO);
     }
     else
     {
         return(new int[0]);
     }
 }