From 87a056536fe1aa4bec63f834bf3c20f217486858 Mon Sep 17 00:00:00 2001 From: bozmir Date: Fri, 20 Dec 2024 14:36:32 +0100 Subject: [PATCH] temp commit --- Assets/Scenes/Main.unity | 24 +++- Assets/Scripts/KerstSpecial/RaceController.cs | 8 +- Assets/Scripts/KerstSpecial/WorldAsset.cs | 5 + .../Scripts/KerstSpecial/kerstAssets.prefab | 116 ++++++++++++++++++ Assets/Scripts/KerstSpecial/skate1.mp3 | 3 + Assets/Scripts/KerstSpecial/skate1.mp3.meta | 23 ++++ Assets/Scripts/KerstSpecial/skate2.mp3 | 3 + Assets/Scripts/KerstSpecial/skate2.mp3.meta | 23 ++++ Assets/Scripts/KerstSpecial/skate3.mp3 | 3 + Assets/Scripts/KerstSpecial/skate3.mp3.meta | 23 ++++ Assets/Scripts/KerstSpecial/skate4.mp3 | 3 + Assets/Scripts/KerstSpecial/skate4.mp3.meta | 23 ++++ Assets/Scripts/KerstSpecial/skate5.mp3 | 3 + Assets/Scripts/KerstSpecial/skate5.mp3.meta | 23 ++++ 14 files changed, 278 insertions(+), 5 deletions(-) create mode 100644 Assets/Scripts/KerstSpecial/skate1.mp3 create mode 100644 Assets/Scripts/KerstSpecial/skate1.mp3.meta create mode 100644 Assets/Scripts/KerstSpecial/skate2.mp3 create mode 100644 Assets/Scripts/KerstSpecial/skate2.mp3.meta create mode 100644 Assets/Scripts/KerstSpecial/skate3.mp3 create mode 100644 Assets/Scripts/KerstSpecial/skate3.mp3.meta create mode 100644 Assets/Scripts/KerstSpecial/skate4.mp3 create mode 100644 Assets/Scripts/KerstSpecial/skate4.mp3.meta create mode 100644 Assets/Scripts/KerstSpecial/skate5.mp3 create mode 100644 Assets/Scripts/KerstSpecial/skate5.mp3.meta diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index fcde4cfe..8f0d7457 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -5642,6 +5642,12 @@ MonoBehaviour: jumpInput: {fileID: 11400000, guid: 46da008daaac56f4c97ac21469b742b5, type: 2} routeFile: {fileID: 4900000, guid: 3653738e64b9fdb44a2b7a94ac1bfed4, type: 3} scoreBoard: {fileID: 0} + skateSounds: + - {fileID: 8300000, guid: c1bdb48337881c7499d244b5a15ca504, type: 3} + - {fileID: 8300000, guid: cbc235ac622c1c24b9ad1c6707382d19, type: 3} + - {fileID: 8300000, guid: 7eb60a55d7849dd4f866e8cb994ba927, type: 3} + - {fileID: 8300000, guid: a81b96cde8d8c6a4f8ce9f150d12d228, type: 3} + - {fileID: 8300000, guid: 8defafbcd7936bd4c8be95686db00ce1, type: 3} Finished: m_PersistentCalls: m_Calls: @@ -16160,6 +16166,16 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 3345354220723192482, guid: ebce7bf1c9549ba42b5ecb2d008acc85, + type: 3} + propertyPath: height + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 3345354220723192482, guid: ebce7bf1c9549ba42b5ecb2d008acc85, + type: 3} + propertyPath: overrideHeight + value: 1 + objectReference: {fileID: 0} - target: {fileID: 3493826917292859223, guid: ebce7bf1c9549ba42b5ecb2d008acc85, type: 3} propertyPath: m_LocalPosition.x @@ -16236,22 +16252,22 @@ PrefabInstance: - target: {fileID: 3849934062868920522, guid: 5fbb7c7c8ec47e849afba1b658f3e07e, type: 3} propertyPath: m_LocalRotation.w - value: 0.19784866 + value: 0.19784737 objectReference: {fileID: 0} - target: {fileID: 3849934062868920522, guid: 5fbb7c7c8ec47e849afba1b658f3e07e, type: 3} propertyPath: m_LocalRotation.x - value: 0.08259889 + value: 0.082598075 objectReference: {fileID: 0} - target: {fileID: 3849934062868920522, guid: 5fbb7c7c8ec47e849afba1b658f3e07e, type: 3} propertyPath: m_LocalRotation.y - value: 0.90134984 + value: 0.90135056 objectReference: {fileID: 0} - target: {fileID: 3849934062868920522, guid: 5fbb7c7c8ec47e849afba1b658f3e07e, type: 3} propertyPath: m_LocalRotation.z - value: -0.37630022 + value: -0.37629926 objectReference: {fileID: 0} - target: {fileID: 3919916255551741050, guid: 5fbb7c7c8ec47e849afba1b658f3e07e, type: 3} diff --git a/Assets/Scripts/KerstSpecial/RaceController.cs b/Assets/Scripts/KerstSpecial/RaceController.cs index 61e898e9..78cf93e1 100644 --- a/Assets/Scripts/KerstSpecial/RaceController.cs +++ b/Assets/Scripts/KerstSpecial/RaceController.cs @@ -67,6 +67,8 @@ public class RaceController : MonoBehaviour private GameObject[] zoneObjects = new GameObject[4]; private GameObject finishObject; public GameObject scoreBoard; + + public List skateSounds = new List(); private void Start() { @@ -292,7 +294,11 @@ private void Update() playerSpeed = 200; playerOffRoadSpeed = 200; } - + if (IsDebugOn && Keyboard.current[Key.PageUp].wasPressedThisFrame) + { + player.GetComponent().enabled = false; + } + if (routeCoords == null || !isReadyForStart) return; diff --git a/Assets/Scripts/KerstSpecial/WorldAsset.cs b/Assets/Scripts/KerstSpecial/WorldAsset.cs index b0fdcd39..2dfe64ff 100644 --- a/Assets/Scripts/KerstSpecial/WorldAsset.cs +++ b/Assets/Scripts/KerstSpecial/WorldAsset.cs @@ -34,6 +34,11 @@ public virtual void Start() WorldTransform wt = prefab.AddComponent(); GameObjectWorldTransformShifter shifter = prefab.AddComponent(); wt.SetShifter(shifter); + wt.onPostShift.AddListener((a, b) => { + Vector3 pos = startCoord.ToUnity(); + startPosition = new Vector3(pos.x, height, pos.z); + OnSetStartPosition(startPosition); + }); prefab.transform.position = transform.position; prefab.transform.rotation = Quaternion.Euler(XRotation, YRotation, 0); prefab.transform.localScale = Vector3.one * size; diff --git a/Assets/Scripts/KerstSpecial/kerstAssets.prefab b/Assets/Scripts/KerstSpecial/kerstAssets.prefab index a4ef251d..b360e2b6 100644 --- a/Assets/Scripts/KerstSpecial/kerstAssets.prefab +++ b/Assets/Scripts/KerstSpecial/kerstAssets.prefab @@ -378,6 +378,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 6394794085922993720} + - {fileID: 4474273435395243909} - {fileID: 2404680009658422146} - {fileID: 3238645178898562405} - {fileID: 3017824755420438903} @@ -2126,6 +2127,121 @@ Transform: type: 3} m_PrefabInstance: {fileID: 2270735258816230496} m_PrefabAsset: {fileID: 0} +--- !u!1001 &2312501467749306386 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 3493826917292859223} + m_Modifications: + - target: {fileID: 184488617825971997, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: m_Name + value: finishboogAsset + objectReference: {fileID: 0} + - target: {fileID: 1043342137179706032, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: lat + value: 53.217533 + objectReference: {fileID: 0} + - target: {fileID: 1043342137179706032, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: lon + value: 5.834668 + objectReference: {fileID: 0} + - target: {fileID: 1043342137179706032, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: size + value: 2500 + objectReference: {fileID: 0} + - target: {fileID: 1043342137179706032, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: height + value: 47 + objectReference: {fileID: 0} + - target: {fileID: 1043342137179706032, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: prefab + value: + objectReference: {fileID: 919132149155446097, guid: c50f7e1863f0bfc44bd6d1cc1c7f13cd, + type: 3} + - target: {fileID: 1043342137179706032, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: YRotation + value: 93.5 + objectReference: {fileID: 0} + - target: {fileID: 1043342137179706032, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: overrideHeight + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1043342137179706032, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: addMeshCollider + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2161842372067422103, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2161842372067422103, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2161842372067422103, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2161842372067422103, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2161842372067422103, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2161842372067422103, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2161842372067422103, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2161842372067422103, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2161842372067422103, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2161842372067422103, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d83fe8f6e9861c14986f1476f15452b0, type: 3} +--- !u!4 &4474273435395243909 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2161842372067422103, guid: d83fe8f6e9861c14986f1476f15452b0, + type: 3} + m_PrefabInstance: {fileID: 2312501467749306386} + m_PrefabAsset: {fileID: 0} --- !u!1001 &2702857961710211578 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/KerstSpecial/skate1.mp3 b/Assets/Scripts/KerstSpecial/skate1.mp3 new file mode 100644 index 00000000..f95730f9 --- /dev/null +++ b/Assets/Scripts/KerstSpecial/skate1.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae19637df5d37851765c292b1f8b2d5444427a6821f800eddd756081d7f46cc1 +size 14780 diff --git a/Assets/Scripts/KerstSpecial/skate1.mp3.meta b/Assets/Scripts/KerstSpecial/skate1.mp3.meta new file mode 100644 index 00000000..a4945f93 --- /dev/null +++ b/Assets/Scripts/KerstSpecial/skate1.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: c1bdb48337881c7499d244b5a15ca504 +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/KerstSpecial/skate2.mp3 b/Assets/Scripts/KerstSpecial/skate2.mp3 new file mode 100644 index 00000000..b4718681 --- /dev/null +++ b/Assets/Scripts/KerstSpecial/skate2.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26f509f9f84f3d8cf8fab244b368fbc7b84f3cd7815fd0da55d551c68bef2c14 +size 19451 diff --git a/Assets/Scripts/KerstSpecial/skate2.mp3.meta b/Assets/Scripts/KerstSpecial/skate2.mp3.meta new file mode 100644 index 00000000..38d86a4f --- /dev/null +++ b/Assets/Scripts/KerstSpecial/skate2.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: cbc235ac622c1c24b9ad1c6707382d19 +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/KerstSpecial/skate3.mp3 b/Assets/Scripts/KerstSpecial/skate3.mp3 new file mode 100644 index 00000000..74a4086b --- /dev/null +++ b/Assets/Scripts/KerstSpecial/skate3.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0e79daedd7a24aa24a41cb782b666c9ebbe8b16c593bd81853fbaca0f7e0e3a +size 13818 diff --git a/Assets/Scripts/KerstSpecial/skate3.mp3.meta b/Assets/Scripts/KerstSpecial/skate3.mp3.meta new file mode 100644 index 00000000..1517dd26 --- /dev/null +++ b/Assets/Scripts/KerstSpecial/skate3.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 7eb60a55d7849dd4f866e8cb994ba927 +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/KerstSpecial/skate4.mp3 b/Assets/Scripts/KerstSpecial/skate4.mp3 new file mode 100644 index 00000000..94b9921d --- /dev/null +++ b/Assets/Scripts/KerstSpecial/skate4.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85d78012d738dd1ce710057269f31be804ab60e09cb91c6fb6737f620e613a70 +size 11914 diff --git a/Assets/Scripts/KerstSpecial/skate4.mp3.meta b/Assets/Scripts/KerstSpecial/skate4.mp3.meta new file mode 100644 index 00000000..d7aca887 --- /dev/null +++ b/Assets/Scripts/KerstSpecial/skate4.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: a81b96cde8d8c6a4f8ce9f150d12d228 +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/KerstSpecial/skate5.mp3 b/Assets/Scripts/KerstSpecial/skate5.mp3 new file mode 100644 index 00000000..0577d01c --- /dev/null +++ b/Assets/Scripts/KerstSpecial/skate5.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3a85bf8bd9822d7e7d8390b8f158f824eb213cc4d6c1e407dbbe3122b1fbcf1 +size 10689 diff --git a/Assets/Scripts/KerstSpecial/skate5.mp3.meta b/Assets/Scripts/KerstSpecial/skate5.mp3.meta new file mode 100644 index 00000000..dc7c25d0 --- /dev/null +++ b/Assets/Scripts/KerstSpecial/skate5.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 8defafbcd7936bd4c8be95686db00ce1 +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: