Beispiel #1
0
 public void CopyTo(
     KeyValuePair <int, XRefEntry>[] entries,
     int index
     )
 {
     Entries.CopyTo(entries, index);
 }
Beispiel #2
0
    public void NewSave()
    {
        var e = new SaveData[Entries.Length + 1];

        Entries.CopyTo(e, 0);
        e[Entries.Length] = new SaveData {
            DateSaved = DateTime.Now,
            Id        = Entries.Length,
            Name      = PlayerCharacters.Singleton.CurrentCharacter.Data.id + "_" + Entries.Length
        };
        Entries = e;
        Save(PlayerCharacters.Singleton.CurrentCharacter.Data.id);
        Game.Singleton.SaveGame(Entries[Entries.Length - 1]);
        RebuildSaves();
    }
Beispiel #3
0
 public void NewCharacter(string name)
 {
     if (name != string.Empty)
     {
         var e = new PlayerCharacterData[Entries.Length + 1];
         Entries.CopyTo(e, 0);
         e[Entries.Length] = new PlayerCharacterData {
             Name = name,
             Id   = Entries.Max(x => x.Id) + 1
         };
         Entries = e;
         CreateEntry(Entries.Length - 1);
         Save(0);
         ChangeCharacter(Entries[Entries.Length - 1]);
     }
 }
 /// <summary>
 /// Copies the items of the list to an array, starting at a given index.
 /// </summary>
 /// <param name="array">The array to which the items will be copied.</param>
 /// <param name="arrayIndex">The starting index.</param>
 public void CopyTo(T[] array, int arrayIndex)
 {
     Entries.CopyTo(array, arrayIndex);
 }
Beispiel #5
0
 /// <summary>
 /// Copies the elements of the <b>ICollection</b> to an <b>Array</b>,
 /// starting at a particular index.
 /// </summary>
 /// <param name="array">
 /// The one-dimensional <b>Array</b> that is the destination of the
 /// elements copied from <b>ICollection</b>.
 /// </param>
 /// <param name="index">
 /// The zero-based index in array at which copying begins.
 /// </param>
 public virtual void CopyTo(Array array, int index)
 {
     Entries.CopyTo(array, index);
 }