Пример #1
0
 public PlayerVehicle(float x, float y, float screenWidth, PizarooView pizarooView)
 {
     X           = x;
     Y           = y;
     imgVehicle  = pizarooView.imgBike;
     Width       = imgVehicle.Width;
     Height      = imgVehicle.Height;
     ScreenWidth = screenWidth;
 }
Пример #2
0
        public AIVehicle(float x, float y, float screenWidth, PizarooView pizarooView, int vehicleNum)
        {
            X = x;
            Y = y;
            if (vehicleNum == 1)
            {
                imgVehicle = pizarooView.imgCar1;
            }
            else if (vehicleNum == 2)
            {
                imgVehicle = pizarooView.imgCar2;
            }
            else if (vehicleNum == 3)
            {
                imgVehicle = pizarooView.imgCar3;
            }

            Width       = imgVehicle.Width;
            Height      = imgVehicle.Height;
            ScreenWidth = screenWidth;
        }