This commit is contained in:
2023-03-06 16:48:12 +05:30
parent 4308e88aac
commit bca1a00ba8
3 changed files with 19 additions and 64 deletions

View File

@@ -29,6 +29,8 @@ public class Spinner : MonoBehaviour
public int CurNumber;
public float CurrentSpeed {get; private set;}
public TMP_Text numText;
public GameObject btnSpin;
void Start()
{
@@ -61,6 +63,7 @@ public class Spinner : MonoBehaviour
}
IEnumerator spin(){
btnSpin.SetActive(false);
pushing=true;
numText.text ="";
float m_spinSmoothness = Random.Range(SpinSmoothness, SpinSmoothnessMax);
@@ -69,6 +72,7 @@ public class Spinner : MonoBehaviour
yield return new WaitForFixedUpdate();
}
pushing = false;
}
@@ -83,6 +87,8 @@ public class Spinner : MonoBehaviour
OnSpinStopped.Invoke(LandedNumber);
btnSpin.SetActive(true);
}
int GetLandedNumber(){