예제 #1
0
    GameObject getTetromino()
    {
        currentTetromino = nextTetromino;
        int i = Random.Range(0, groups.Length);

        nextTetromino = groups[i];
        nextShape.UpdateShape(i);
        return(currentTetromino);
    }
예제 #2
0
    // 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");
    }