Untitled

 avatar
saddam
plain_text
2 years ago
630 B
1
Indexable
Never
 
    int[] ParseData;
    void Parse(string _levelOrder)
    {

        ParseData = new int[_levelOrder.Length];
        for (int i = 0; i < _levelOrder.Length; i++)
        {
            int outPut;
            if (int.TryParse(_levelOrder[i].ToString(), out outPut))
                ParseData[i] = outPut;
            else
                ParseData[i] = i;
        }
    }




        int levelLength = Levels.Length;
        for (int i = 0; i < ParseData.Length; i++)
        {
            if (i < levelLength && ParseData[i] < levelLength)
                Levels[i].dificulty = ParseData[i];
        }