예제 #1
0
        public static (float x, float y) GetIconLocation(SongColor songColor, Note note)
        {
            var column = 3;

            switch (songColor)
            {
            case SongColor.All:
                column = 3;
                break;

            case SongColor.Cute:
                column = 0;
                break;

            case SongColor.Cool:
                column = 1;
                break;

            case SongColor.Passion:
                column = 2;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(songColor));
            }
            var row = 0;

            if (note.IsTap)
            {
                row = 0;
            }
            else if (note.IsHoldStart)
            {
                row = 1;
            }
            else if (note.FlickType == NoteFlickType.Left)
            {
                row = 2;
            }
            else if (note.FlickType == NoteFlickType.Right)
            {
                row = 3;
            } /*else if (note.ShouldBeRenderedAsSlide) {
               * // Not implemented, don't use.
               * row = 4;
               * }*/

            return(x : Definitions.NoteImageCellWidth *column, y : Definitions.NoteImageCellHeight *row);
        }
예제 #2
0
        private static Color GetRibbonVertexColor(float f, SongColor songColor, bool simple)
        {
            var n1 = (int)f;
            var n2 = n1 + 1;

            f %= 1;
            Color[] colors;
            if (simple)
            {
                colors = SimpleWhiteColors;
            }
            else
            {
                switch (songColor)
                {
                case SongColor.All:
                    colors = RainbowColors;
                    break;

                case SongColor.Cute:
                    colors = CuteColors;
                    break;

                case SongColor.Cool:
                    colors = CoolColors;
                    break;

                case SongColor.Passion:
                    colors = PassionColors;
                    break;

                default:
                    throw new ArgumentOutOfRangeException(nameof(songColor));
                }
            }
            n1 %= colors.Length;
            n2 %= colors.Length;
            var color1 = colors[n1];
            var color2 = colors[n2];

            return(D2DHelper.Lerp(color1, color2, f));
        }