Example #1
0
    private void RemoveSkipPoints()
    {
        int counter = 0;

        for (int i = 0; i < allPoints.Length; i++)
        {
            if (allPoints[i].IsScriptCompleted())
            {
                allPoints[i] = null;
            }
            else
            {
                counter++;
            }
        }

        TransformEventLevelScript[] newAllPoints = new TransformEventLevelScript[counter];

        int currentNewIndex = 0;

        for (int i = 0; i < allPoints.Length; i++)
        {
            if (allPoints[i] != null)
            {
                newAllPoints[currentNewIndex] = allPoints[i];
                currentNewIndex++;
            }
        }
        allPoints = newAllPoints;
    }
Example #2
0
 private void OrganizeAllPoints()
 {
     for (int i = 0; i < allPoints.Length; i++)
     {
         if (!allPoints[i].name.Equals(orderOfEvents[i]))  //if it does not equal
         {
             int index = GetIndexOfToStringInAllPoints(orderOfEvents[i], i);
             TransformEventLevelScript temp = allPoints[i];
             allPoints[i]     = allPoints[index];
             allPoints[index] = temp;
         }
     }
 }