simple UI added

This commit is contained in:
Mausham
2025-12-11 18:20:42 -08:00
parent 60e58082ac
commit 2118bb7c36
576 changed files with 126744 additions and 13 deletions

View File

@@ -7,6 +7,7 @@ public class PlatformManager : MonoBehaviour
private GameObject currentPlatfrom;
[Inject] private PlatformPool pool;
[Inject] private InputReader inputReader;
[Inject] private StartScreenController startScreenController;
private int yPos=0;
public int rotspeed = 1;
@@ -24,13 +25,6 @@ public class PlatformManager : MonoBehaviour
{
inputReader.OnDragValueChanged -= DragPerformed;
}
private void DragPerformed(Vector2 drag)
{
float rotAmount = -drag.normalized.x * rotspeed;
transform.Rotate(0, rotAmount, 0);
}
public void ShowInitialPlatforms()
{
@@ -52,5 +46,22 @@ public class PlatformManager : MonoBehaviour
}
}
private void DragPerformed(Vector2 drag)
{
if(startScreenController.hasGameStarted)
{
float rotAmount = -drag.normalized.x * rotspeed;
#if UNITY_EDITOR || UNITY_STANDALONE
if (inputReader.isclicked)
{
transform.Rotate(0, rotAmount, 0);
}
#else
transform.Rotate(0, rotAmount, 0);
#endif
}
}
}