コード例 #1
0
        public override void OnUpdate()
        {
            gEngineForce *= (1.0f - FrameDelta);

            vehicle.ApplyEngineForce(gEngineForce, 2);
            vehicle.SetBrake(gBreakingForce, 2);
            vehicle.ApplyEngineForce(gEngineForce, 3);
            vehicle.SetBrake(gBreakingForce, 3);

            vehicle.SetSteeringValue(gVehicleSteering, 0);
            vehicle.SetSteeringValue(gVehicleSteering, 1);

            base.OnUpdate();
        }
コード例 #2
0
        public override int Update(float elapsedTime)
        {
            gEngineForce *= (1.0f - elapsedTime);

            vehicle.ApplyEngineForce(gEngineForce, 2);
            vehicle.SetBrake(gBreakingForce, 0);
            vehicle.ApplyEngineForce(gEngineForce, 3);
            vehicle.SetBrake(gBreakingForce, 1);

            vehicle.SetSteeringValue(gVehicleSteering, 0);
            vehicle.SetSteeringValue(gVehicleSteering, 1);


            return(base.Update(elapsedTime));
        }
コード例 #3
0
 public void TurnRight()
 {
     vehicle.SetSteeringValue(steeringAngle, 2);
     vehicle.SetSteeringValue(steeringAngle, 3);
 }