Skip to content

Commit

Permalink
Updated Player Audio Distance and Screen Text
Browse files Browse the repository at this point in the history
  • Loading branch information
Rud156 committed Aug 18, 2018
1 parent e0b7f94 commit 3f0d835
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 6 deletions.
80 changes: 78 additions & 2 deletions Assets/Scenes/Home.unity
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ RectTransform:
- {fileID: 1488636869}
- {fileID: 1940156156}
- {fileID: 1658810525}
- {fileID: 885883611}
m_Father: {fileID: 161721485}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -961,6 +962,81 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 224542051681485936, guid: c964729d225b5204caeb9632eb750b62,
type: 2}
m_PrefabInternal: {fileID: 808171049}
--- !u!1 &885883610
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 885883611}
- component: {fileID: 885883613}
- component: {fileID: 885883612}
m_Layer: 5
m_Name: Info_4
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &885883611
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 885883610}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.99999905, y: 0.99999905, z: 0.99999905}
m_Children: []
m_Father: {fileID: 534069043}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.000030517578, y: -282.2}
m_SizeDelta: {x: 0, y: 62.7}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &885883612
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 885883610}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: eec7152cfa11b0649a25fe1a209e56f3, type: 3}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Slide and J-Turn your way out of situations
--- !u!222 &885883613
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 885883610}
m_CullTransparentMesh: 0
--- !u!1 &1426013608
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1180,7 +1256,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Stay alive for as long as possible.
m_Text: Stay alive for as long as possible
--- !u!222 &1658810527
CanvasRenderer:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1391,7 +1467,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Avoid Police. Don't get Busted or Killed
m_Text: Avoid the Police. Don't get Busted or Killed
--- !u!222 &1940156158
CanvasRenderer:
m_ObjectHideFlags: 0
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -5140,7 +5140,7 @@ MonoBehaviour:
minAudioPitch: 1
pitchLerpRatio: 0.4
minDistanceToPlayer: 5
maxDistanceToPlayer: 15
maxDistanceToPlayer: 20
maxVehiclesToConsider: 7
--- !u!1 &550054381
GameObject:
Expand Down
6 changes: 3 additions & 3 deletions Assets/Scripts/Player/Movement/PlayerCarController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,21 @@ private void UpdateTrails()
UpdateTrail(frontLTrail, frontLWheelCollider, true);

// Front Right Wheel
result = frontLWheelCollider.GetGroundHit(out wheelHit);
result = frontRWheelCollider.GetGroundHit(out wheelHit);
if (result && wheelHit.collider.CompareTag(TagManager.Terrain))
UpdateTrail(frontRTrail, frontRWheelCollider);
else
UpdateTrail(frontRTrail, frontRWheelCollider, true);

// Rear Left Wheel
result = frontLWheelCollider.GetGroundHit(out wheelHit);
result = rearLWheelCollider.GetGroundHit(out wheelHit);
if (result && wheelHit.collider.CompareTag(TagManager.Terrain))
UpdateTrail(rearLTrail, rearLWheelCollider);
else
UpdateTrail(rearLTrail, rearLWheelCollider, true);

// Rear Right Wheel
result = frontLWheelCollider.GetGroundHit(out wheelHit);
result = rearRWheelCollider.GetGroundHit(out wheelHit);
if (result && wheelHit.collider.CompareTag(TagManager.Terrain))
UpdateTrail(rearRTrail, rearRWheelCollider);
else
Expand Down

0 comments on commit 3f0d835

Please sign in to comment.