public bool isOver(CarDoc car) { IMovingObject tmp = car.CarItems[car.BODY]; foreach (Kid k in Kids) { if (k.X - 50 > tmp.X) { return true; } } return false; }
public Form1() { InitializeComponent(); StartWindow(); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.DoubleBuffered = true; this.gameStarted = false; Bullets = new BulletsDoc(); Houses = new HousesDoc(this.Width); Kids = new KidsDoc(); Clouds = new CloudsDoc(this.Width, this.Height); Music = new Sounds(); Levels = new LevelsDoc(); CurrentLevel = new List<Kid>(); CarItems = new CarDoc(); Players = new PlayersDoc(); KidsKilled = 0; }