protected void Move(float accel, float turn) { finalStats = baseStats; inputAccel = accel; MoveVehicle(accel, turn); }
void Awake() { Rigidbody = GetComponent <Rigidbody>(); Collider = GetComponentInChildren <BoxCollider>(); sensor = gameObject.AddComponent <NPCSensor>(); sensor.Vehicle = this; sensor.rayLength = SENSOR_LENGTH; Weight = 200; baseStats = new Vehicle.Stats { TopSpeed = 10f, Acceleration = 5f, AccelerationCurve = 5f, Braking = 10f, ReverseAcceleration = 5f, ReverseSpeed = 5f, Steer = 10f, CoastingDrag = 8f, Grip = 1f, AddedGravity = 1f, Suspension = .2f }; }
void Awake() { Rigidbody = GetComponent <Rigidbody>(); Collider = GetComponentInChildren <BoxCollider>(); baseStats = new Vehicle.Stats { TopSpeed = 11f, Acceleration = 5f, AccelerationCurve = 5f, Braking = 10f, ReverseAcceleration = 5f, ReverseSpeed = 5f, Steer = 10f, CoastingDrag = 4f, Grip = .95f, AddedGravity = 5f, Suspension = .2f }; Weight = 2000; }