Пример #1
0
 public void ClearDatabase()
 {
     ListCharacteristicsRace.Clear();
     ListCharacteristicsRace.Add(new CharacteristicsRace());
     CurrentScriptableObjectsCR = ListCharacteristicsRace[0];
     currentIndex = 0;
 }
Пример #2
0
 public void AddElementToList()
 {
     if (ListCharacteristicsRace == null)
     {
         ListCharacteristicsRace = new List <CharacteristicsRace>();
     }
     CurrentScriptableObjectsCR = new CharacteristicsRace();
     ListCharacteristicsRace.Add(CurrentScriptableObjectsCR);
     currentIndex = ListCharacteristicsRace.Count - 1;
 }
Пример #3
0
 public void RemoveCurrentElement()
 {
     if (currentIndex > 0)
     {
         CurrentScriptableObjectsCR = ListCharacteristicsRace[--currentIndex];
         ListCharacteristicsRace.RemoveAt(++currentIndex);
     }
     else
     {
         ListCharacteristicsRace.Clear();
         CurrentScriptableObjectsCR = null;
     }
 }
Пример #4
0
 public CharacteristicsRace GetNextValue()
 {
     if (currentIndex < ListCharacteristicsRace.Count)
     {
         currentIndex++;
     }
     CountList = ListCharacteristicsRace.Count;
     if (currentIndex == CountList)
     {
         currentIndex = 0;
     }
     CurrentScriptableObjectsCR = this[currentIndex];
     return(CurrentScriptableObjectsCR);
 }
Пример #5
0
 public CharacteristicsRace GetPrevValue()
 {
     if (currentIndex > 0)
     {
         currentIndex--;
     }
     CurrentScriptableObjectsCR = this[currentIndex];
     CountList = ListCharacteristicsRace.Count;
     if (currentIndex == 0)
     {
         currentIndex = CountList;
     }
     return(CurrentScriptableObjectsCR);
 }