public void AddToCreatureDictionary(CreatureToSerialize creature) { // get size of dict and assign that as the ID. If 0, ID is 0. Now there will be 1 creature in there so when we add the next creature, there will be 1 in the dictionary so the ID will be 1, etc. short dictionaryID = (Int16)p1Creatures.Count; p1Creatures.Add(dictionaryID, creature); }
void SaveLocally() { CreatureToSerialize cts = new CreatureToSerialize(_moveDistance); _gameData.AddToCreatureDictionary(cts); }