예제 #1
0
 public void ClearDatabase()
 {
     EnemyList.Clear();
     EnemyList.Add(new ScObCharacteristicsEnemy());
     CurrentScriptableObjects = EnemyList[0];
     currentIndex             = 0;
 }
예제 #2
0
 public void AddElementToList()
 {
     if (EnemyList == null)
     {
         EnemyList = new List <ScObCharacteristicsEnemy>();
     }
     CurrentScriptableObjects = new ScObCharacteristicsEnemy();
     EnemyList.Add(CurrentScriptableObjects);
     currentIndex = EnemyList.Count - 1;
 }
예제 #3
0
 public void RemoveCurrentElement()
 {
     if (currentIndex > 0)
     {
         CurrentScriptableObjects = EnemyList[--currentIndex];
         EnemyList.RemoveAt(++currentIndex);
     }
     else
     {
         EnemyList.Clear();
         CurrentScriptableObjects = null;
     }
 }
예제 #4
0
 public ScObCharacteristicsEnemy GetNextValue()
 {
     if (currentIndex < EnemyList.Count)
     {
         currentIndex++;
     }
     CountList = EnemyList.Count;
     if (currentIndex == CountList)
     {
         currentIndex = 0;
     }
     CurrentScriptableObjects = this[currentIndex];
     return(CurrentScriptableObjects);
 }
예제 #5
0
 public ScObCharacteristicsEnemy GetPrevValue()
 {
     if (currentIndex > 0)
     {
         currentIndex--;
     }
     CurrentScriptableObjects = this[currentIndex];
     CountList = EnemyList.Count;
     if (currentIndex == 0)
     {
         currentIndex = CountList;
     }
     return(CurrentScriptableObjects);
 }