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