simple UI added
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user