示例#1
0
文件: Car.cs 项目: patkinm/Diplom
 public Car(Graphics model, Graphics gc, Map map, CurrentPosition pos, Bitmap bmp)
 {
     this.model = model;
     this.gc = gc;
     this.map = map;
     carImg = Image.FromFile("menti.gif");
     currentX = initialX - 1;
     currentY = initialY - 1;
     this.pos = pos;
     this.pos.X = 1;
     this.pos.Y = 1;
     this.pos.VelocityX = 100;
     this.pos.VelocityY = 0;
     this.bmp = bmp;
     way = Way.LEFT;
     move();
 }
示例#2
0
文件: Form1.cs 项目: patkinm/Diplom
 private void moveCar()
 {
     CurrentPosition pos = new CurrentPosition();
     Car car = new Car(createGraphics(), createGraphics(), map, pos, mapBmp);
     constructMap();
 }