void loadTiles() { foreach (PlatformData platform in levelData.getPlatformData()) { FSprite plat = new FSprite(platform.image); tileSize = plat.localRect.width; Tiles[(int)platform.x, (int)platform.y] = 1; Static staticPlatform = new Static(new FSprite(platform.image)); staticPlatform.SetPosition(new Vector2(platform.x * plat.localRect.width , -platform.y * plat.localRect.height )); tileSprites.Add(staticPlatform); AddChild(staticPlatform); } }