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

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