Beispiel #1
0
    public void IncrementAlgorithmIndex()
    {
        currentAlgorithimIndex++;
        if (currentAlgorithimIndex > algorithms.Length - 1)
        {
            currentAlgorithimIndex = 0;
        }

        currentAlgorithm = algorithms[currentAlgorithimIndex];
    }
Beispiel #2
0
 void Awake()
 {
     instance         = this;
     algorithms       = GetComponents <BasePathalgorithm>();
     currentAlgorithm = algorithms[currentAlgorithimIndex];
 }