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

@@ -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);
}
}