public void NextLevel() { chairList.Clear(); idList.Clear(); collectibleList.Clear(); character.Level++; currLvl.GetLvl(character.Level); if (character.Level > 0) { for (int l = 1; l <= currLvl.LvlList[character.Level - 1].Obst; l++) { chairOb = new Obstacles(rgn.Next((l - 1) * (frequency - character.Level * 2), l * (frequency - character.Level * 2)), rgn.Next(10, 300), 70, 90, true, chair); chairOb.CollectibleImage = chair; chairList.Add(chairOb); } } for (int l = 1; l <= currLvl.LvlList[character.Level - 1].IntenseMilk; l++) { collectOb = new Collectibles(rgn.Next((l - 1) * (frequency - character.Level * 2), l * (frequency - character.Level * 2)), rgn.Next(10, 300), 36, 70, true, milk); collectOb.CollectibleImage = milk; collectibleList.Add(collectOb); } for (int l = 1; l <= currLvl.LvlList[character.Level - 1].Ids; l++) { idOb = new Collectibles(rgn.Next((l - 1) * (frequency - character.Level * 2), l * (frequency - character.Level * 2)), rgn.Next(10, 300), 52, 70, true, id); idOb.CollectibleImage = id; idList.Add(idOb); } }
private void Resume(Collectibles coll) { coll.Speed = coll.PreSpeed; }
private void Pause(Collectibles coll)//including obstacles { coll.Speed = 0; coll.PreXpos = coll.Position.X; }