예제 #1
0
        private void _recreate()
        {
            var         go = GameObject.Instantiate(Resources.Load <GameObject> ("NoteHold"));
            HoldScaling hs = go.GetComponent <HoldScaling> ();

            hs.Begin = mBeginAction.CurrentData.transform;
            hs.End   = mSubAction.CurrentData.transform;
        }
예제 #2
0
    public void KeysBared()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            TimeControlSystem.isPlaying = !TimeControlSystem.isPlaying;
        }
        if (Input.GetKeyDown(KeyCode.Z))
        {
            if (Mathf.Abs(GridManager.Instance.GridDir) > 1)
            {
                MessageBox.Show("You Should Enable Grids First!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            NewNote("NoteNormal", regundo: true);
        }
        if (Input.GetKeyDown(KeyCode.X))
        {
            if (Mathf.Abs(GridManager.Instance.GridDir) > 1)
            {
                MessageBox.Show("You Should Enable Grids First!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            NewNote("NoteChain", regundo: true);
        }
        if (Input.GetKeyDown(KeyCode.C))
        {
            if (Mathf.Abs(GridManager.Instance.GridDir) > 1)
            {
                MessageBox.Show("You Should Enable Grids First!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            GameObject go = NewNote("NoteHoldSub", 500);
            Transform  ed = go.transform;

            go = NewNote("NoteHoldHold");
            Transform bg = go.transform;

            go = GameObject.Instantiate(Resources.Load <GameObject> ("NoteHold"));
            HoldScaling hs = go.GetComponent <HoldScaling> ();
            hs.Begin = bg;
            hs.End   = ed;
            UndoSystem.RegisterUndo(new UndoSystem.HoldCreateUndoAction(bg.GetComponent <NoteData>(), ed.GetComponent <NoteData>()));
        }

        if (Input.GetKeyDown(KeyCode.U))
        {
            if (PlaybackSystem.PlaySpeed >= 0.2f)
            {
                PlaybackSystem.PlaySpeed -= 0.1f;
            }
            else
            {
                PlaybackSystem.PlaySpeed = 0.1f;
            }
        }
        else if (Input.GetKeyDown(KeyCode.I))
        {
            if (PlaybackSystem.PlaySpeed <= 2.9f)
            {
                PlaybackSystem.PlaySpeed += 0.1f;
            }
            else
            {
                PlaybackSystem.PlaySpeed = 3f;
            }
        }

        KeyCode[] ls = { KeyCode.Alpha1, KeyCode.Alpha2, KeyCode.Alpha3, KeyCode.Alpha4 };
        for (int i = 0; i < 4; i++)
        {
            if (Input.GetKeyDown(ls [i]))
            {
                WidthStoreN = i;
            }
        }

        if (Input.GetKeyDown(KeyCode.G))
        {
            GridManager.Instance.GridDir++;
            if (GridManager.Instance.GridDir > 1)
            {
                GridManager.Instance.GridDir = -1;
            }
        }
    }