public void RemovePlatform(PlatformViewModel p) { var platformsList = new List <PlatformViewModel>(_platforms); platformsList.Remove(p); Platforms = platformsList; }
public void BuildNewLevelPlatform(double x, double y, double width, double height) { var platformsList = new List <PlatformViewModel>(_platforms); var newPlatform = new PlatformViewModel(x, y, width, height, platformsList.Count.ToString()); platformsList.Add(newPlatform); _level.AddPlatformByBlock(newPlatform.Platform); Platforms = platformsList; }