Beispiel #1
0
    public void SpawnSetOfBeatBars(int leftBeatX, int rightBeatX)
    {
        Beat left = Instantiate(beat.gameObject).GetComponent <Beat>();

        left.SetSide("left");
        left.transform.position = new Vector3(leftBeatX, 0);
        Beat right = Instantiate(beat.gameObject).GetComponent <Beat>();

        right.SetSide("right");
        right.transform.position = new Vector3(rightBeatX, 0);
        beats.Enqueue(new Beat[] { left, right });
    }