public Tank(Model model,GraphicsDevice device,Camera camera) : base(model) { mousepick = new MousePick(device, camera); turretBone = model.Bones["turret_geo"]; rightfrontwheel = model.Bones["r_front_wheel_geo"]; rightbackwheel = model.Bones["r_back_wheel_geo"]; leftfrontwheel = model.Bones["l_front_wheel_geo"]; leftbackwheel = model.Bones["l_back_wheel_geo"]; rightsteergeo = model.Bones["r_steer_geo"]; leftsteergeo = model.Bones["l_steer_geo"]; hatchgeo = model.Bones["hatch_geo"]; canongeo = model.Bones["canon_geo"]; leftBackWheelTransform = leftbackwheel.Transform; rightBackWheelTransform = rightbackwheel.Transform; leftFrontWheelTransform = leftfrontwheel.Transform; rightFrontWheelTransform = rightfrontwheel.Transform; leftSteerTransform = leftsteergeo.Transform; rightSteerTransform = rightsteergeo.Transform; turretTransform = turretBone.Transform; hatchTransform = hatchgeo.Transform; canonTransform = canongeo.Transform; currentAngle = MathHelper.PiOver2; currentPosition = new Vector3(0, 0, 0); tankBox = new BoundingBox(MIN, MAX); }
public Tank(Model model, GraphicsDevice device, Camera camera) : base(model) { mousepick = new MousePick(device, camera); turretBone = model.Bones["turret_geo"]; rightfrontwheel = model.Bones["r_front_wheel_geo"]; rightbackwheel = model.Bones["r_back_wheel_geo"]; leftfrontwheel = model.Bones["l_front_wheel_geo"]; leftbackwheel = model.Bones["l_back_wheel_geo"]; rightsteergeo = model.Bones["r_steer_geo"]; leftsteergeo = model.Bones["l_steer_geo"]; hatchgeo = model.Bones["hatch_geo"]; canongeo = model.Bones["canon_geo"]; leftBackWheelTransform = leftbackwheel.Transform; rightBackWheelTransform = rightbackwheel.Transform; leftFrontWheelTransform = leftfrontwheel.Transform; rightFrontWheelTransform = rightfrontwheel.Transform; leftSteerTransform = leftsteergeo.Transform; rightSteerTransform = rightsteergeo.Transform; turretTransform = turretBone.Transform; hatchTransform = hatchgeo.Transform; canonTransform = canongeo.Transform; currentAngle = MathHelper.PiOver2; currentPosition = new Vector3(0, 0, 0); tankBox = new BoundingBox(MIN, MAX); }
public Tank(Model model, GraphicsDevice device, Camera camera) : base(model) { turretBone = model.Bones["turret_geo"]; cannonBone = model.Bones["canon_geo"]; hatchBone = model.Bones["hatch_geo"]; lFrontWBone = model.Bones["l_front_wheel_geo"]; rFrontWBone = model.Bones["r_front_wheel_geo"]; lSteer = model.Bones["l_steer_geo"]; rSteer = model.Bones["r_steer_geo"]; lBackWBone = model.Bones["l_back_wheel_geo"]; rBackWBone = model.Bones["r_back_wheel_geo"]; tankBone = model.Bones["tank_geo"]; mousePick = new MousePick(device, camera); if (turretBone != null) { turretTransform = turretBone.Transform; } if (lFrontWBone != null) { lFrontTransform = lFrontWBone.Transform; } if (rFrontWBone != null) { rFrontTransform = rFrontWBone.Transform; } if (lBackWBone != null) { lBackTransform = lBackWBone.Transform; } if (rBackWBone != null) { rBackTransform = rBackWBone.Transform; } }
public Tank(Model model, GraphicsDevice device, Camera camera) : base(model) { mousepick = new MousePick(device, camera); turretBone = model.Bones["turret_geo"]; rightfrontwheel = model.Bones["r_front_wheel_geo"]; rightbackwheel = model.Bones["r_back_wheel_geo"]; leftfrontwheel = model.Bones["l_front_wheel_geo"]; leftbackwheel = model.Bones["l_back_wheel_geo"]; rightsteergeo = model.Bones["r_steer_geo"]; leftsteergeo = model.Bones["l_steer_geo"]; hatchgeo = model.Bones["hatch_geo"]; canongeo = model.Bones["canon_geo"]; leftBackWheelTransform = leftbackwheel.Transform; rightBackWheelTransform = rightbackwheel.Transform; leftFrontWheelTransform = leftfrontwheel.Transform; rightFrontWheelTransform = rightfrontwheel.Transform; leftSteerTransform = leftsteergeo.Transform; rightSteerTransform = rightsteergeo.Transform; turretTransform = turretBone.Transform; hatchTransform = hatchgeo.Transform; canonTransform = canongeo.Transform; currentPosition = prePosition; }
public Tank(Model model,GraphicsDevice device,Camera camera) : base(model) { mousepick = new MousePick(device, camera); turretBone = model.Bones["turret_geo"]; rightfrontwheel = model.Bones["r_front_wheel_geo"]; rightbackwheel = model.Bones["r_back_wheel_geo"]; leftfrontwheel = model.Bones["l_front_wheel_geo"]; leftbackwheel = model.Bones["l_back_wheel_geo"]; rightsteergeo = model.Bones["r_steer_geo"]; leftsteergeo = model.Bones["l_steer_geo"]; hatchgeo = model.Bones["hatch_geo"]; canongeo = model.Bones["canon_geo"]; leftBackWheelTransform = leftbackwheel.Transform; rightBackWheelTransform = rightbackwheel.Transform; leftFrontWheelTransform = leftfrontwheel.Transform; rightFrontWheelTransform = rightfrontwheel.Transform; leftSteerTransform = leftsteergeo.Transform; rightSteerTransform = rightsteergeo.Transform; turretTransform = turretBone.Transform; hatchTransform = hatchgeo.Transform; canonTransform = canongeo.Transform; currentPosition = prePosition; }