public void IncrementAlgorithmIndex() { currentAlgorithimIndex++; if (currentAlgorithimIndex > algorithms.Length - 1) { currentAlgorithimIndex = 0; } currentAlgorithm = algorithms[currentAlgorithimIndex]; }
void Awake() { instance = this; algorithms = GetComponents <BasePathalgorithm>(); currentAlgorithm = algorithms[currentAlgorithimIndex]; }