Example #1
0
    private void GenerateRowFromList()
    {
        string bottomRow = levelData[levelData.Count - 1];

        //Debug.Log(bottomRow);
        for (int i = 0; i < bottomRow.Length; i++)
        {
            switch (bottomRow[i])
            {
            case prawnObj:
                Spawning.SpawnObject("Prawn", i - 1);
                Debug.Log(i);
                break;

            case rubbishObj:
                Spawning.SpawnObject("Rabbish", i - 1);
                break;

            case sharkObj:
                Spawning.SpawnObject("Shark", i - 1);
                break;

            default:
                break;
            }
        }
        levelData.RemoveAt(levelData.Count - 1);
    }