public CarPanel(int[] dim) { this.DoubleBuffered = true; car = CT_Helper.resizeImage(Properties.Resources.Taxi_GTA2, new Size(46, 24)); this.Size = new Size(46, 46); this.BackColor = Color.Transparent; carCon = new CarController(); this.Location = new Point(dim[0] / 2 - car.Width / 2, dim[1] / 2 - car.Height / 2); this.Paint += new PaintEventHandler(Car_Paint); }
public CarImpl(Size dim, Size gameFieldSize, CollisionEntity entity, Size size) { this.dim = dim; this.Angle = 0; this.Size = size; this.Car = CT_Helper.resizeImage(Properties.Resources.Taxi_GTA2, this.Size); this.destroyedCar = CT_Helper.resizeImage(Properties.Resources.GTA2_CAR_71, this.Size); this.entity = entity; this.carCon = new CarController(); this.Location = new Point(dim.Width / 2 - this.Car.Width / 2, dim.Height / 2 - this.Car.Height / 2); this.gameFieldSize = gameFieldSize; this.Destroyed = false; }