From bc0b39c575805de12aa3f7c033b10024e8c20e4e Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 8 Aug 2023 16:27:38 +1000 Subject: [PATCH] clear ui samples and fix speedo --- .../sr_silverstorage/sr_silverstorage.unity | 15 ++++++++++++++ .../sr_star_fraenkel_zermelo.unity | 15 ++++++++++++++ Assets/Src/ShipPhysics.cs | 8 +++++--- Assets/Src/UI/Controls.uxml | 2 +- Assets/Src/UI/Timing.uxml | 20 +++++++++---------- ProjectSettings/ProjectSettings.asset | 3 +-- 6 files changed, 47 insertions(+), 16 deletions(-) diff --git a/Assets/Scenes/sr_silverstorage/sr_silverstorage.unity b/Assets/Scenes/sr_silverstorage/sr_silverstorage.unity index 7b4a77c..2fdcfb6 100644 --- a/Assets/Scenes/sr_silverstorage/sr_silverstorage.unity +++ b/Assets/Scenes/sr_silverstorage/sr_silverstorage.unity @@ -934,6 +934,10 @@ PrefabInstance: propertyPath: timingDoc value: objectReference: {fileID: 766862837} + - target: {fileID: 5313449993149091347, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3} + propertyPath: controlsUI + value: + objectReference: {fileID: 5198188376350273127} - target: {fileID: 5313449993149091347, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3} propertyPath: controlsDoc value: @@ -1184,3 +1188,14 @@ MonoBehaviour: m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0} m_Name: m_EditorClassIdentifier: +--- !u!114 &5198188376350273127 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 3792430562793951787, guid: 217f9c8f922f2d41cac52c3699bde478, type: 3} + m_PrefabInstance: {fileID: 5198188376350273124} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8401c141ee093632d847505914412cee, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Scenes/sr_star_fraenkel_zermelo/sr_star_fraenkel_zermelo.unity b/Assets/Scenes/sr_star_fraenkel_zermelo/sr_star_fraenkel_zermelo.unity index 1278363..2c88401 100644 --- a/Assets/Scenes/sr_star_fraenkel_zermelo/sr_star_fraenkel_zermelo.unity +++ b/Assets/Scenes/sr_star_fraenkel_zermelo/sr_star_fraenkel_zermelo.unity @@ -241,6 +241,17 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 217f9c8f922f2d41cac52c3699bde478, type: 3} +--- !u!114 &235775466 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 3792430562793951787, guid: 217f9c8f922f2d41cac52c3699bde478, type: 3} + m_PrefabInstance: {fileID: 235775465} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8401c141ee093632d847505914412cee, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &339815783 PrefabInstance: m_ObjectHideFlags: 0 @@ -985,6 +996,10 @@ PrefabInstance: propertyPath: timingDoc value: objectReference: {fileID: 766862837} + - target: {fileID: 5313449993149091347, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3} + propertyPath: controlsUI + value: + objectReference: {fileID: 235775466} - target: {fileID: 5313449993149091347, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3} propertyPath: controlsDoc value: diff --git a/Assets/Src/ShipPhysics.cs b/Assets/Src/ShipPhysics.cs index 18f9f0d..75c8be0 100644 --- a/Assets/Src/ShipPhysics.cs +++ b/Assets/Src/ShipPhysics.cs @@ -4,18 +4,20 @@ public class ShipPhysics : MonoBehaviour { ShipControls ship; float maxDmg = 150f; - float maxImpulse = 50f; + float maxImpulse = 5000f; void Awake() { ship = GetComponent(); } void OnCollisionEnter(Collision collision) { + float totalForce = collision.impulse.magnitude / Time.fixedDeltaTime; + Debug.Log($"mag {collision.relativeVelocity.magnitude}"); - Debug.Log($"impulse {collision.impulse} {collision.impulse.magnitude}"); + Debug.Log($"impulse {collision.impulse} {collision.impulse.magnitude} {totalForce}"); // if (collision.relativeVelocity.magnitude > maxDmg) { - if (collision.impulse.magnitude > maxImpulse) { + if (totalForce > maxImpulse) { Debug.Log("Ddddestroyed by" + collision.gameObject.name); ship.Respawn(); return; diff --git a/Assets/Src/UI/Controls.uxml b/Assets/Src/UI/Controls.uxml index 4d8a715..848cd71 100644 --- a/Assets/Src/UI/Controls.uxml +++ b/Assets/Src/UI/Controls.uxml @@ -3,7 +3,7 @@ - + diff --git a/Assets/Src/UI/Timing.uxml b/Assets/Src/UI/Timing.uxml index 0c21146..027b153 100644 --- a/Assets/Src/UI/Timing.uxml +++ b/Assets/Src/UI/Timing.uxml @@ -6,26 +6,26 @@ - + - + - - - + + + - - + + - - - + + + diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index dcbe2de..77e4ef3 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -134,8 +134,7 @@ PlayerSettings: vulkanEnableCommandBufferRecycling: 1 loadStoreDebugModeEnabled: 0 bundleVersion: 0.1 - preloadedAssets: - - {fileID: 11400000, guid: 020903acd8b50dd45a683fb9312ba7af, type: 2} + preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1