changed rot speed

This commit is contained in:
Mausham
2025-12-15 18:23:07 -08:00
parent f4c55dec05
commit 5a95751da2
4 changed files with 38 additions and 21 deletions

View File

@@ -2,7 +2,7 @@
- Project name: Ultimate-HelixJump
- Unity version: Unity 6000.3.0f1
- Active game object:
- Name: TapToStartBtn
- Name: PlatformManager
- Tag: Untagged
- Layer: UI
- Layer: Default
<!-- UNITY CODE ASSIST INSTRUCTIONS END -->

View File

@@ -10807,7 +10807,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_RaycastPadding: {x: -250, y: 0, z: -250, w: -800}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -11223,7 +11223,7 @@ Transform:
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -0.7}
m_LocalScale: {x: 0.15, y: 0.15, z: 0.15}
m_LocalScale: {x: 0.12, y: 0.12, z: 0.12}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 185655300}
@@ -13369,7 +13369,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &1613812280
RectTransform:
m_ObjectHideFlags: 0
@@ -13728,7 +13728,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 393df497de02fce4399040e619446397, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlatformManager
rotSpeed: 5
rotSpeed: 8
--- !u!1 &1942266448
GameObject:
m_ObjectHideFlags: 0

View File

@@ -8,6 +8,7 @@ public class PlatformManager : MonoBehaviour,IPlatformManager
private float yPos = 0f;
public float rotSpeed = 5f;
private float rotAmount;
private void Start()
{
@@ -23,7 +24,10 @@ public class PlatformManager : MonoBehaviour,IPlatformManager
{
inputReader.OnDragValueChanged -= HandleDrag;
}
private void LateUpdate()
{
transform.Rotate(Vector3.up * rotAmount);
}
void ShowPlatforms()
{
foreach (var platform in pool.All)
@@ -43,16 +47,17 @@ public class PlatformManager : MonoBehaviour,IPlatformManager
private void HandleDrag(Vector2 drag)
{
float rotAmount = -drag.normalized.x * rotSpeed;
rotAmount = -drag.normalized.x * rotSpeed;
#if UNITY_EDITOR || UNITY_STANDALONE
if (!inputReader.isMouseButtonPressed) return;
transform.Rotate(Vector3.up * rotAmount);
//#if UNITY_EDITOR || UNITY_STANDALONE
// if (!inputReader.isMouseButtonPressed) return;
// transform.Rotate(Vector3.up * rotAmount);
#elif UNITY_IOS || UNITY_ANDROID
transform.Rotate(Vector3.up * rotAmount);
//#elif UNITY_IOS || UNITY_ANDROID
// transform.Rotate(Vector3.up * rotAmount * DPI);
#endif
//#endif
//transform.Rotate(Vector3.up * rotAmount);
}
}

View File

@@ -8,7 +8,7 @@ PlayerSettings:
AndroidProfiler: 0
AndroidFilterTouchesWhenObscured: 0
AndroidEnableSustainedPerformanceMode: 0
defaultScreenOrientation: 4
defaultScreenOrientation: 0
targetDevice: 2
useOnDemandResources: 0
accelerometerFrequency: 60
@@ -18,7 +18,7 @@ PlayerSettings:
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
m_ShowUnitySplashScreen: 1
m_ShowUnitySplashLogo: 1
m_ShowUnitySplashLogo: 0
m_SplashScreenOverlayOpacity: 1
m_SplashScreenAnimation: 1
m_SplashScreenLogoStyle: 1
@@ -39,7 +39,9 @@ PlayerSettings:
y: 0
width: 1
height: 1
m_SplashScreenLogos: []
m_SplashScreenLogos:
- logo: {fileID: 21300000, guid: bb541db0e6579ab44872c3d75c5e6ccf, type: 3}
duration: 2
m_VirtualRealitySplashScreen: {fileID: 0}
m_HolographicTrackingLossScreen: {fileID: 0}
defaultScreenWidth: 1024
@@ -267,7 +269,7 @@ PlayerSettings:
useCustomGradlePropertiesTemplate: 0
useCustomGradleSettingsTemplate: 0
useCustomProguardFile: 0
AndroidTargetArchitectures: 2
AndroidTargetArchitectures: 3
AndroidAllowedArchitectures: -13
AndroidSplashScreenScale: 0
androidSplashScreen: {fileID: 0}
@@ -296,7 +298,14 @@ PlayerSettings:
AndroidAppBundleSizeToValidate: 150
AndroidReportGooglePlayAppDependencies: 1
androidSymbolsSizeThreshold: 800
m_BuildTargetIcons: []
m_BuildTargetIcons:
- m_BuildTarget:
m_Icons:
- serializedVersion: 2
m_Icon: {fileID: 2800000, guid: bb541db0e6579ab44872c3d75c5e6ccf, type: 3}
m_Width: 128
m_Height: 128
m_Kind: 0
m_BuildTargetPlatformIcons:
- m_BuildTarget: iPhone
m_Icons:
@@ -528,6 +537,9 @@ PlayerSettings:
- m_BuildTarget: iPhone
m_StaticBatching: 1
m_DynamicBatching: 0
- m_BuildTarget: Android
m_StaticBatching: 1
m_DynamicBatching: 0
m_BuildTargetShaderSettings: []
m_BuildTargetGraphicsJobs: []
m_BuildTargetGraphicsJobMode: []
@@ -536,8 +548,8 @@ PlayerSettings:
m_APIs: 10000000
m_Automatic: 1
- m_BuildTarget: AndroidPlayer
m_APIs: 150000000b000000
m_Automatic: 0
m_APIs: 0b00000015000000
m_Automatic: 1
m_BuildTargetVRSettings: []
m_DefaultShaderChunkSizeInMB: 16
m_DefaultShaderChunkCount: 0