1
0
Fork 0

Reduced maxBrakeTime

This commit is contained in:
Piegames 2018-04-23 23:51:18 +02:00
parent 1aa488732b
commit ea919ab215
3 changed files with 3 additions and 4 deletions

View file

@ -451,7 +451,7 @@ MonoBehaviour:
turnSpeed: 2
drift: 1
brake: 2
maxBrakeTime: 30
maxBrakeTime: 5
accelerationTime: 2.115
decelerationTime: 1.2346
--- !u!198 &198696209911726984

View file

@ -1469,7 +1469,7 @@ Prefab:
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
type: 2}
propertyPath: m_AnchoredPosition.x
value: 64.16286
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
type: 2}

View file

@ -68,8 +68,7 @@ public class PlayerMovement : MonoBehaviour {
Vector3 speedVec = new Vector3(rb.velocity.x, rb.velocity.y, 0);
float speed = speedVec.magnitude;
maxBrakeTime = 5f;
bool braking = Input.GetAxis("Vertical") < 0;
if (braking && brakeTime >= maxBrakeTime) {
brakeTime = maxBrakeTime;