コード例 #1
0
ファイル: Car.cs プロジェクト: alittle1234/XNA_Project
        /// On construction the physical/collision objects are created, but
        /// not registered
        public Car(bool FWDrive, bool RWDrive, float maxSteerAngle, float steerRate, float wheelSideFriction,
             float wheelFwdFriction, float wheelTravel, float wheelRadius, float wheelZOffset, float wheelRestingFrac,
             float wheelDampingFrac, int wheelNumRays, float driveTorque, float gravity)
        {
            this.fWDrive = FWDrive;
            this.bWDrive = RWDrive;
            this.maxSteerAngle = maxSteerAngle;
            this.steerRate = steerRate;
            this.wheelSideFriction = wheelSideFriction;
            this.wheelFwdFriction = wheelFwdFriction;
            this.wheelTravel = wheelTravel;
            this.wheelRadius = wheelRadius;
            this.wheelZOffset = wheelZOffset;
            this.wheelRestingFrac = wheelRestingFrac;
            this.wheelDampingFrac = wheelDampingFrac;
            this.wheelNumRays = wheelNumRays;
            this.driveTorque = driveTorque;
            this.gravity = gravity;

            chassis = new Chassis(this);

            SetupDefaultWheels();
        }
コード例 #2
0
 public void DisableCar() => Chassis?.DisableChassis();
コード例 #3
0
 public void EnableCar() => Chassis?.EnableChassis();