public void OnTaoped(int lane)
        {
            switch (this.notesSelectManager.GetMode())
            {
            case (byte)NotesSelectManager.MODE.SINGLE:
                NoteData note = new NoteData(notesManager.GetIndex(), (byte)lane, (byte)NoteData.NOTE.SINGLE, soundManager.GetTime(), -1, -1);
                notesManager.AddNote(note);
                break;

            case (byte)NotesSelectManager.MODE.SLIDE:
                break;

            case (byte)NotesSelectManager.MODE.FLICK:
                note = new NoteData(notesManager.GetIndex(), (byte)lane, (byte)NoteData.NOTE.FLICK, soundManager.GetTime(), -1, -1);
                notesManager.AddNote(note);
                break;
            }
        }
示例#2
0
        public void OnTapped(Vector3 point)
        {
            byte lane;

            if (point.x <= this.notesManager.lane_width * -3)
            {
                lane = 0;
            }
            else if (point.x >= this.notesManager.lane_width * 3)
            {
                lane = 6;
            }
            else
            {
                lane = (byte)(Math.Round(point.x / this.notesManager.lane_width, MidpointRounding.AwayFromZero) + 3);
            }

            switch (this.GetMode())
            {
            case (byte)NotesSelectManager.MODE.SINGLE:
                float time = soundManager.GetTime() + (notesManager.to - point.y) / ((notesManager.to - notesManager.from) / notesManager.speed);
                notesManager.AddNote(new NoteData(notesManager.GetIndex(), lane, (byte)NoteData.NOTE.SINGLE, time, -1, -1));
                break;

            case (byte)NotesSelectManager.MODE.SLIDE:
                time = soundManager.GetTime() + (notesManager.to - point.y) / ((notesManager.to - notesManager.from) / notesManager.speed);
                NoteData pressNote   = new NoteData(notesManager.GetIndex(), lane, (byte)NoteData.NOTE.SLIDE_PRESS, time, notesManager.GetIndex() + 1, -1);
                NoteData releaseNote = new NoteData(notesManager.GetIndex() + 1, lane, (byte)NoteData.NOTE.SLIDE_RELEASE, time + 0.5f, -1, notesManager.GetIndex());
                notesManager.AddNote(pressNote);
                notesManager.AddNote(releaseNote);
                break;

            case (byte)NotesSelectManager.MODE.SLIDE_VIA:
                break;

            case (byte)NotesSelectManager.MODE.FLICK:
                time = soundManager.GetTime() + (notesManager.to - point.y) / ((notesManager.to - notesManager.from) / notesManager.speed);
                notesManager.AddNote(new NoteData(notesManager.GetIndex(), lane, (byte)NoteData.NOTE.FLICK, time, -1, -1));
                break;
            }
        }