Skip to content

Commit

Permalink
Fix gold spending. Fix player score zeroing on finish. Added thumbnai…
Browse files Browse the repository at this point in the history
…ls for wheels
  • Loading branch information
niechaiev committed Apr 25, 2024
1 parent bed0be4 commit f6a9a17
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 18 deletions.
15 changes: 14 additions & 1 deletion Assets/Imported Assets/vehicles/db11/rims.mat
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-4301688848867703518
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
Expand Down Expand Up @@ -116,7 +129,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.15094337, g: 0.15094337, b: 0.15094337, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.15094334, g: 0.15094334, b: 0.15094334, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
15 changes: 14 additions & 1 deletion Assets/Imported Assets/vehicles/db11/tire.mat
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-5139299603776977647
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
Expand Down Expand Up @@ -50,7 +63,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 0ddb457f1074f5c47ba03101e3033beb, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
Expand Down
15 changes: 14 additions & 1 deletion Assets/Imported Assets/vehicles/rims.mat
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,20 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.42452827, g: 0.42452827, b: 0.42452827, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.42452824, g: 0.42452824, b: 0.42452824, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &6871104597447334735
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
Binary file modified Assets/Prefabs/Tuning/Thumbnails/wheelPorsche_thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets/Prefabs/Tuning/Thumbnails/wheel_thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Assets/Resources/bmw.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ MonoBehaviour:
thumbnail: {fileID: 0}
- price: 500
upgrade: {fileID: 1951875902552606310, guid: 9b2661d807d319740ad332bba3f9c181, type: 3}
thumbnail: {fileID: 0}
thumbnail: {fileID: 21300000, guid: aa885158db5db8d4982037beb24a5611, type: 3}
- price: 50
upgrade: {fileID: 7781750542417436331, guid: 72fb5060ea41f3447acf625d26d54633, type: 3}
thumbnail: {fileID: 0}
Expand Down
17 changes: 11 additions & 6 deletions Assets/Resources/car_5_blue.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,15 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 60e3013e6ec34b4a92bcc1f80361a464, type: 3}
m_Name:
m_EditorClassIdentifier:
maxSteerAngle: 35
thresholdAngularVelocity: 0.8
handbrakeStiffness: 0.1
torque: 800
driftingTorque: 1500
handbrakeTorque: 90000
brakeTorque: 20000
frontWheelGrip: 1.1
allWheelGripFactor: 1.7
wheels:
- {fileID: 1472678341078364655}
- {fileID: 2413637668169163666}
Expand All @@ -1117,10 +1126,6 @@ MonoBehaviour:
- {fileID: 1745873291780315432}
- {fileID: 5648856892146103637}
centerOfMass: {fileID: 6548038664405415491}
torque: 800
maxSteering: 35
handbrakePower: 90000
brakePower: 10000
--- !u!114 &3378154755422346488
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1151,10 +1156,10 @@ MonoBehaviour:
thumbnail: {fileID: 0}
- price: 500
upgrade: {fileID: 1951875902552606310, guid: 9b2661d807d319740ad332bba3f9c181, type: 3}
thumbnail: {fileID: 0}
thumbnail: {fileID: 21300000, guid: aa885158db5db8d4982037beb24a5611, type: 3}
- price: 900
upgrade: {fileID: 484352657842017170, guid: 3bab1051033d36140bcedfeeb79c8554, type: 3}
thumbnail: {fileID: 0}
thumbnail: {fileID: 21300000, guid: a608da805b2bcca4fa9ce4ec2882d569, type: 3}
selected: 0
wheelMeshes: []
colorTuning:
Expand Down
17 changes: 11 additions & 6 deletions Assets/Resources/delorian.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,15 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 60e3013e6ec34b4a92bcc1f80361a464, type: 3}
m_Name:
m_EditorClassIdentifier:
maxSteerAngle: 35
thresholdAngularVelocity: 0.8
handbrakeStiffness: 0.1
torque: 1000
driftingTorque: 1500
handbrakeTorque: 90000
brakeTorque: 20000
frontWheelGrip: 1.1
allWheelGripFactor: 1.7
wheels:
- {fileID: 1472678341078364655}
- {fileID: 2413637668169163666}
Expand All @@ -1067,10 +1076,6 @@ MonoBehaviour:
- {fileID: 2413307277885197521}
- {fileID: 2824274285231040643}
centerOfMass: {fileID: 6548038664405415491}
torque: 1000
maxSteering: 35
handbrakePower: 90000
brakePower: 10000
--- !u!114 &3378154755422346488
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1098,10 +1103,10 @@ MonoBehaviour:
thumbnail: {fileID: 0}
- price: 500
upgrade: {fileID: 1951875902552606310, guid: 9b2661d807d319740ad332bba3f9c181, type: 3}
thumbnail: {fileID: 0}
thumbnail: {fileID: 21300000, guid: aa885158db5db8d4982037beb24a5611, type: 3}
- price: 900
upgrade: {fileID: 484352657842017170, guid: 3bab1051033d36140bcedfeeb79c8554, type: 3}
thumbnail: {fileID: 0}
thumbnail: {fileID: 21300000, guid: a608da805b2bcca4fa9ce4ec2882d569, type: 3}
- price: 1000
upgrade: {fileID: 4548386381965586289, guid: fd62e5ee640f0034494b80188bfac63c, type: 3}
thumbnail: {fileID: 0}
Expand Down
6 changes: 5 additions & 1 deletion Assets/Scripts/Garage/CarShopPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ private void BuyCar()
{
Player.Instance.AddOwnedCar(_previewedCarInfo.CarId);
Player.Instance.SelectedCar = _previewedCarInfo.CarId;
Player.Instance.Cash -= _previewedCarInfo.Price;

if (_previewedCarInfo.IsCurrencyGold)
Player.Instance.Gold -= _previewedCarInfo.Price;
else
Player.Instance.Cash -= _previewedCarInfo.Price;

GAManager.OnMoneySpent(false, _previewedCarInfo.Price, "car", _previewedCarInfo.CarId.ToString());
priceText.SetText("Owned");
Expand Down
1 change: 0 additions & 1 deletion Assets/Scripts/Level/UI/PauseMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ private void Awake()
});
leaveButton.onClick.AddListener(() =>
{
PhotonNetwork.LocalPlayer.SetScore(0);
PhotonNetwork.Disconnect();
SceneManager.LoadScene("Garage");
});
Expand Down
2 changes: 2 additions & 0 deletions Assets/Scripts/Score/Score.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using Drive;
using Photon.Pun;
using Photon.Pun.UtilityScripts;
using TMPro;
using UnityEngine;

Expand Down Expand Up @@ -44,6 +45,7 @@ public override void OnDisable()
base.OnDisable();
if (_coroutine != null)
StopCoroutine(_coroutine);
PhotonNetwork.LocalPlayer.SetScore(0);
}
}

Expand Down

0 comments on commit f6a9a17

Please sign in to comment.