GameObject getTetromino() { currentTetromino = nextTetromino; int i = Random.Range(0, groups.Length); nextTetromino = groups[i]; nextShape.UpdateShape(i); return(currentTetromino); }
// Start is called before the first frame update void Start() { audioManager = FindObjectOfType <AudioManager>(); nextShape = FindObjectOfType <NextShape>(); int rand = Random.Range(0, groups.Length); nextTetromino = groups[rand]; nextShape.UpdateShape(rand); spawnNext(Face.FRONT); audioManager.Play("theme"); }