Beispiel #1
0
        public void RemovePlatform(PlatformViewModel p)
        {
            var platformsList = new List <PlatformViewModel>(_platforms);

            platformsList.Remove(p);
            Platforms = platformsList;
        }
Beispiel #2
0
        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;
        }