コード例 #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");
    }