changed rot speed
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user