Better Start Menu
This commit is contained in:
@@ -34,6 +34,7 @@ public class Dice : MonoBehaviour
|
||||
started = false;
|
||||
CancelInvoke("RandomNumbers");
|
||||
|
||||
rb.angularVelocity = new Vector3(5, 5, 5);
|
||||
rb.useGravity = true;
|
||||
|
||||
foreach (TMP_Text t in numbers)
|
||||
@@ -45,8 +46,9 @@ public class Dice : MonoBehaviour
|
||||
private void RandomNumbers()
|
||||
{
|
||||
int random = Random.Range(1, 7);
|
||||
|
||||
|
||||
rb.angularVelocity = new Vector3(5, 5, 5);
|
||||
|
||||
foreach (TMP_Text t in numbers)
|
||||
{
|
||||
t.text = random.ToString();
|
||||
|
||||
@@ -42,9 +42,8 @@ public class StartHandler : MonoBehaviour
|
||||
|
||||
PlayerPrefs.SetString("roomcode", code);
|
||||
PlayerPrefs.Save();
|
||||
|
||||
GUIUtility.systemCopyBuffer = code;
|
||||
layout2.GetComponentInChildren<TMP_Text>().text = "Your room code is: \n" + code + "\n copied to clipboard!";
|
||||
|
||||
layout2.GetComponentInChildren<TMP_Text>().text = "Your room code is: \n" + code;
|
||||
}
|
||||
|
||||
public void ButtonJoin()
|
||||
@@ -62,4 +61,15 @@ public class StartHandler : MonoBehaviour
|
||||
SceneManager.LoadScene(1, LoadSceneMode.Single);
|
||||
client.Close();
|
||||
}
|
||||
|
||||
public void ButtonBack()
|
||||
{
|
||||
layout1.SetActive(true);
|
||||
layout2.SetActive(false);
|
||||
}
|
||||
|
||||
public void ButtonCopy()
|
||||
{
|
||||
GUIUtility.systemCopyBuffer = PlayerPrefs.GetString("roomcode");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user