void SetFloorPlantedStates(SimpleJSON.JSONArray PA) { foreach (SimpleJSON.JSONClass s in PA.AsArray.Childs) { // The planted square were saved in the properties // Iterate through these planted squares and plant them as well as set their color. // squares[s[posX],s[posZ]].targetColor = s[color]; squares[s[posX].AsInt, s[posZ].AsInt].Plant(s[plantPrefabKey].AsInt, JsonUtil.ConvertJsonToColor((SimpleJSON.JSONClass)s[color])); } }