Ejemplo n.º 1
0
        // Constructors
        public Sprite(Sprite copy)
        {
            layers = copy.layers;
            currentX = copy.currentX;
            currentY = copy.currentY;
            currentAngle = copy.currentAngle;
            currentR = copy.currentR;
            currentG = copy.currentG;
            currentB = copy.currentB;
            totalCode = copy.totalCode;
            path = copy.path;
            action = copy.GetActionList();
            l = copy.l;
            o = copy.o;

            switch (l)
            {
                case (layer.Foreground):
                    ControlClass.foreground.Add(this);
                    break;
                case (layer.Background):
                    ControlClass.background.Add(this);
                    break;
                case (layer.Pass):
                    ControlClass.pass.Add(this);
                    break;
                case (layer.Fail):
                    ControlClass.fail.Add(this);
                    break;
            }
        }
Ejemplo n.º 2
0
 public static Sprite DrawPoint(Sprite img, double startTime, double angle, int xc, int yc, int radius)
 {
     Sprite spr = img;
     int x = (int)(radius * Math.Cos(angle * (Math.PI / 180.0))) + xc;
     int y = (int)(radius * Math.Sin(angle * (Math.PI / 180.0))) + yc;
     spr.Move(startTime, x, y);
     return spr;
 }
Ejemplo n.º 3
0
 public static Sprite ExpandPoint(Sprite img, int ease, double startTime, double endTime, int angle, int xc, int yc, int radius1, int radius2)
 {
     Sprite spr = img;
     int x1 = (int)(radius1 * Math.Cos(angle * (Math.PI / 180.0))) + xc;
     int y1 = (int)(radius1 * Math.Sin(angle * (Math.PI / 180.0))) + yc;
     int x2 = (int)(radius2 * Math.Cos(angle * (Math.PI / 180.0))) + xc;
     int y2 = (int)(radius2 * Math.Sin(angle * (Math.PI / 180.0))) + yc;
     spr.Move(ease, startTime, endTime, x1, y1, x2, y2);
     return spr;
 }
Ejemplo n.º 4
0
 public static Sprite DrawLines(double startTime, double length, double width, Sprite.origin origin)
 {
     Sprite line = DrawLines(startTime, length, width, Sprite.layer.Foreground, origin);
     return line;
 }
Ejemplo n.º 5
0
 public static Sprite DrawLines(double startTime, double length, double width, Sprite.layer layer, Sprite.origin origin)
 {
     Sprite line = new Sprite(@"sb\etc\line.png", layer, origin);
     ScaleLines(line, 0, startTime, startTime, length, width);
     return line;
 }
Ejemplo n.º 6
0
 public static void ScaleLines(Sprite line, int ease, double startTime, double endTime, double length, double width)
 {
     double scaleX = length / 9.0;
     double scaleY = width / 9.0;
     line.Vector(ease, startTime, endTime, line.GetScaleX(), line.GetScaleY(), scaleX, scaleY);
 }
Ejemplo n.º 7
0
 public static Sprite DrawLines(double startTime, double length, double width, Sprite.layer layer)
 {
     Sprite line = DrawLines(startTime, length, width, layer, Sprite.origin.Centre);
     return line;
 }
Ejemplo n.º 8
0
        public static void MoveCircular(Sprite light, double startTime, double endTime, int startAngle, int endAngle, int radius, int originStartX, int originStartY, int originEndX, int originEndY, int accuracy, bool rotate)
        {
            double originX = originStartX;
            double originY = originStartY;
            double offsetx = ((originStartX - originEndX) / ((endTime - startTime) / accuracy));
            double offsety = ((originStartY - originEndY) / ((endTime - startTime) / accuracy));

            double currAngle = startAngle;
            double incAngle = (endAngle - startAngle) / ((endTime - startTime) / accuracy);

            double rotAngle = startAngle * -1;
            double decAngle = (endAngle - startAngle) / ((endTime - startTime) / accuracy);

            for (double j = startTime; j < endTime; j += accuracy)
            {
                MoveCurve(light, j, j + accuracy, (int)currAngle, (int)(currAngle + incAngle), (int)originX, (int)originY, offsetx, offsety, radius);
                if (rotate)
                {
                    light.Rotate(j, j + accuracy, rotAngle, rotAngle - decAngle);
                }
                currAngle = currAngle + incAngle;
                rotAngle = rotAngle - decAngle;
                originX = originX - offsetx;
                originY = originY - offsety;
            }
        }
Ejemplo n.º 9
0
        public void ShootingStar(double startTime, int x, int dir)
        {
            int midPoint = rand.Next(230, 260);
            Sprite star = new Sprite(@"sb\bg\star.png");
            star.Scale(.1);
            star.Rotate(startTime, startTime + beat * 2, 0, rand.Next(60, 180));
            star.Move(1, startTime, startTime + beat / 4 * 3, x, -20, x, 500);
            star.Fade(startTime - 1, startTime, 0, 1);
            star.Parameters(startTime, startTime, "A");
            star.Color(247, 255, 168);

            Sprite line = Mathematics.DrawLines(startTime, 500, 10, dir == 1 ? Sprite.origin.CentreRight : Sprite.origin.CentreLeft);
            line.Rotate(startTime, 90 * dir);
            line.Move(1, startTime, startTime + beat / 4 * 3, x, -20, x, 500);
            Mathematics.ScaleLines(line, 1, startTime + beat, startTime + beat / 4 * 7, 1, 10);
            line.Parameters(startTime, startTime, "A");
            line.Color(247, 255, 168);
            line.Fade(startTime - 1, startTime, 0, 1);
        }
Ejemplo n.º 10
0
 public static void MoveCircular(Sprite light, double startTime, double endTime, int startAngle, int endAngle, int radius, int x, int y)
 {
     MoveCircular(light, startTime, endTime, startAngle, endAngle, radius, x, y, x, y, 30, false);
 }
Ejemplo n.º 11
0
        public void BubblingThing(double startTime, double endTime, int xc, int yc, int length, int dir)
        {
            int x1, x2;
            x1 = xc - length / 2;
            x2 = xc + length / 2;
            int rate = (int)((endTime - startTime) / 1000 * 20);
            for (int i = 0; i < rate; i++)
            {
                int dist = 20 + rand.Next(0, 30);
                double start = rand.Next((int)startTime, (int)(endTime));
                double end = start + rand.Next((int)beat * 4, (int)beat * 16);
                int x = rand.Next(x1, x2);
                double size = rand.Next(10, 70) / 1000.0;
                Color2 c = Color2.HSL2RGB((double)(x - x1) / (x2 - x1), .8, .7);

                Sprite bubble = new Sprite(@"sb\etc\circle.png", dir == 1 ? Sprite.origin.TopCentre : Sprite.origin.BottomCentre);
                bubble.Fade(start, start + beat, 0, 1);
                bubble.Fade(end - beat, end, 1, 0);
                bubble.Scale(size);
                bubble.Move(1, start, end, x, yc, x, yc + dist * dir);
                bubble.Color(start, c.red, c.green, c.blue);
                //bubble.Parameters(start, start, "A");
            }
        }
Ejemplo n.º 12
0
        public void DrawWheels(double startTime, double endTime, int x, int y, double scale, int color, int aps)
        {
            double angle = Math.Abs(aps) * (endTime - startTime) / 1000;

            int amount = 16;
            double interval = 360 / amount;
            bool inv = aps < 0;
            for (double i = 0; i < 180 - 20; i += interval)
            {
                Sprite gear = Mathematics.DrawLines(startTime, 250 * scale, 35 * scale);
                gear.Rotate(startTime, endTime, i + (inv ? angle : 0), i + (inv ? 0 : angle));
                gear.Fade(startTime, startTime + beat / 2, 0, 1);
                gear.Fade(endTime - beat / 2, endTime, 1, 0);
                gear.Move(startTime, x, y);
            }

            Sprite mid = new Sprite(string.Format(@"sb\etc\stripe{0}.png", color));
            mid.Scale(scale - .03 * scale);
            mid.Move(x, y);
            mid.Fade(startTime, startTime + beat, 0, 1);
            mid.Fade(endTime - beat / 2, endTime, 1, 0);
            mid.Rotate(startTime, endTime, 0 + (inv ? angle : 0), 0 + (inv ? 0 : angle));

            Sprite outer = new Sprite(@"sb\etc\outer.png");
            outer.Scale(scale);
            outer.Move(x, y);
            outer.Fade(startTime, startTime + beat / 2, 0, 1);
            outer.Fade(endTime - beat / 2, endTime, 1, 0);

            Sprite inner = new Sprite(@"sb\etc\circle.png");
            inner.Scale(scale * .6);
            inner.Move(x, y);
            inner.Fade(startTime, startTime + beat / 2, 0, 1);
            inner.Fade(endTime - beat / 2, endTime, 1, 0);
        }
Ejemplo n.º 13
0
 public void FadeBackground(Sprite[] bg, double startTime, double endTime, double opacity1, double opacity2)
 {
     for (int i = 0; i < bg.Length; i++)
     {
         bg[i].Fade(startTime, endTime, opacity1, opacity2);
     }
 }
Ejemplo n.º 14
0
        public void DrawNameThing()
        {
            string[][] names =
                                {
                                    new string[]
                                    {
                                        Translate("D"),
                                        Translate("e"),
                                        Translate("p"),
                                        Translate("t"),
                                        Translate("h"),
                                        Translate("s"),
                                    },

                                    new string[]
                                    {
                                        Translate("C"),
                                        Translate("r"),
                                        Translate("y"),
                                        Translate("s"),
                                        Translate("t"),
                                        Translate("a"),
                                        Translate("l"),
                                    }
                                };
            int offsetx = 320;
            int y = 110;
            double size = .7;
            double size2 = size * .7;
            double radius = 80;
            double letterSize = .4;
            int lineLength = 215;
            int lineWidth = 40;
            int dist = 20;
            int offsetLettersX = -5;
            int offsetLettersY = 0;
            Color2 c = new Color2(148, 196, 255);

            //left: Depths
            Sprite line1 = Mathematics.DrawLines(beginning, 1, lineWidth, Sprite.origin.TopLeft);
            line1.Move(beginning, 320 - offsetx, y - (int)radius);
            Mathematics.ScaleLines(line1, 1, beginning + beat, beginning + beat * 2, lineLength, lineWidth);
            line1.Color(c.red, c.green, c.blue);
            line1.Fade(beginning + beat, beginning + beat * 2, 0, 1);
            line1.Fade(ending - beat * 2, ending - beat, 1, 0);

            Sprite circle1 = new Sprite(@"sb\etc\circle.png");
            circle1.Move(beginning, 320 - offsetx, y);
            circle1.Fade(beginning, beginning + beat, 0, 1);
            circle1.Fade(ending - beat, ending, 1, 0);
            circle1.Scale(beginning, size);

            Sprite circle2 = new Sprite(@"sb\etc\circle.png");
            circle2.Move(beginning, 320 - offsetx, y);
            circle2.Fade(beginning, beginning + beat, 0, 1);
            circle2.Fade(ending - beat, ending, 1, 0);
            circle2.Scale(beginning, size2);
            circle2.Color(c.red, c.green, c.blue);

            for (int i = 0; i < names[0].Length; i++)
            {
                Sprite letter = new Sprite($@"sb\text\{names[0][i]}.png", Sprite.origin.TopCentre);
                letter.Move(beginning, 320 - offsetx + (int)radius + offsetLettersX + i * dist, y - (int)radius - offsetLettersY);
                letter.Fade(beginning + beat * 2, beginning + beat * 2.5, 0, 1);
                letter.Fade(ending - beat * 2, ending - beat, 1, 0);
                letter.Scale(letterSize);
            }

            //right: Crystal
            Sprite line2 = Mathematics.DrawLines(beginning, 1, lineWidth, Sprite.origin.BottomRight);
            line2.Move(beginning, 320 + offsetx, y + (int)radius);
            Mathematics.ScaleLines(line2, 1, beginning + beat, beginning + beat * 2, lineLength, lineWidth);
            line2.Color(c.blue, c.red, c.green);
            line2.Fade(beginning + beat, beginning + beat * 2, 0, 1);
            line2.Fade(ending - beat * 2, ending - beat, 1, 0);

            Sprite circle3 = new Sprite(@"sb\etc\circle.png");
            circle3.Move(beginning, 320 + offsetx, y);
            circle3.Fade(beginning, beginning + beat, 0, 1);
            circle3.Fade(ending - beat, ending, 1, 0);
            circle3.Scale(beginning, size);

            Sprite circle4 = new Sprite(@"sb\etc\circle.png");
            circle4.Move(beginning, 320 + offsetx, y);
            circle4.Fade(beginning, beginning + beat, 0, 1);
            circle4.Fade(ending - beat, ending, 1, 0);
            circle4.Scale(beginning, size2);
            circle4.Color(c.blue, c.red, c.green);

            for (int i = 0; i < names[1].Length; i++)
            {
                Sprite letter = new Sprite($@"sb\text\{names[1][i]}.png", Sprite.origin.BottomCentre);
                letter.Move(beginning, 320 + offsetx - (int)radius - offsetLettersX - (names[1].Length - i - 1) * dist, y + (int)radius + offsetLettersY);
                letter.Fade(beginning + beat * 2, beginning + beat * 2.5, 0, 1);
                letter.Fade(ending - beat * 2, ending - beat, 1, 0);
                letter.Scale(letterSize);
            }
        }
Ejemplo n.º 15
0
        public void DrawLyrics1(int line, double startTime, double endTime, int isRight)
        {
            int ox, rx, y;
            int length = (lyrics[line].Count - 2) * 40;
            int size = 40;
            int range = 40;
            int x1 = isRight == 1 ? 320 : (-108 + length / 2 + range);
            int y1 = 240 + size;
            int x2 = isRight == 1 ? (750 - length / 2 - range) : 320;
            int y2 = 480 - size;
            Color2 c1 = new Color2(220, 219, 173);
            Color2 c2 = new Color2(220, 219, 173);

            ox = rand.Next(x1, x2) - (length % 2 == 0 ? 15 : 0);
            y = rand.Next(y1, y2);

            if (isRight > 1)
            {
                ox = 320;
                y = 360;
                c2 = new Color2(174, 200, 220);
                c1 = new Color2(174, 200, 220);
            }

            rx = ox - length / 2;

            double speed = (endTime - startTime) / 1000 * 1;
            for (int i = 1; i < lyrics[line].Count; i++)
            {
                Sprite letter = new Sprite(string.Format(@"sb\text\{0}.png", lyrics[line][i]));
                letter.Scale(.4);
                letter.MoveX(startTime, endTime, rx + (i - 1) * 40, rx + (i - 1) * 40);
                letter.MoveY(startTime, endTime, y, y + rand.Next((int)speed - 5, (int)speed + 5) * (rand.Next(0, 2) == 1  ?  1 : -1));
                letter.Fade(startTime, startTime + beat / 2, 0, 1);
                letter.Fade(endTime - beat / 2, endTime, 1, 0);
                letter.Color(c1.red, c1.green, c1.blue);
            }

            //lines
            Sprite line1 = Mathematics.DrawLines(startTime, 1, 5, Sprite.origin.CentreLeft);
            int offset = 30;

            line1.Move(startTime, endTime, rx - 30, y + offset, rx - 30, y + offset);
            line1.Fade(startTime, startTime + beat / 2, 0, 1);
            Mathematics.ScaleLines(line1, 1, startTime, startTime + beat / 2, length + 60, 5);
            line1.Color(c2.red, c2.green, c2.blue);

            Sprite line2 = Mathematics.DrawLines(startTime, 1, 5, Sprite.origin.CentreRight);

            line2.Move(startTime, endTime, rx + ((lyrics[line].Count - 2) * 40) + 30, y - offset, rx + ((lyrics[line].Count - 2) * 40) + 30, y - offset);
            line2.Fade(startTime, startTime + beat / 2, 0, 1);
            Mathematics.ScaleLines(line2, 1, startTime, startTime + beat / 2, length + 60, 5);
            line2.Color(c2.red, c2.green, c2.blue);

            BubblingThing(startTime, endTime, ox, y + offset, length + 60, 1);
            BubblingThing(startTime, endTime, ox, y - offset, length + 60, -1);
        }
Ejemplo n.º 16
0
        public Sprite[][] DrawHexagon()
        {
            double size = 15;
            double width = 1366 * Control.scale;

            int cx = 320;
            int cy = 320;
            double radius = size / 2;
            double scale = size / 100.0;
            double percentagex = 1;
            double percentagey = 1;
            double intervalx = radius * Math.Cos(30.0 * (Math.PI / 180.0)) * percentagex;
            double intervaly = 2 * ((radius) * Math.Sin(30.0 * (Math.PI / 180.0))) + size * percentagey;
            int amountx = (int)((width) / intervalx) + 5;

            Sprite[][] hexagons = new Sprite[amountx][];
            for (int i = 0; i < hexagons.Length; i++)
            {
                double t = Math.Abs(i - amountx / 2) * (10 / width);
                double height = Math.Pow(t, 2) * 400;
                int amounty = (int)((height) / intervaly) + 5;

                hexagons[i] = new Sprite[amounty];
                for (int j = 0; j < hexagons[i].Length; j++)
                {

                    Sprite hexagon = new Sprite(@"sb\etc\hexagon.png", Sprite.layer.Background);
                    if (i < amountx / 2)
                    {
                        hexagon.MoveX((int)(cx - (intervalx * (amountx / 2 - i))));
                    } else
                    {
                        hexagon.MoveX((int)(cx + (intervalx * (i - amountx / 2))));
                    }

                    if (i % 2 == 0)
                    {
                        if (j < amounty / 2)
                        {
                            hexagon.MoveY((int)(cy - (intervaly * (amounty / 2 - j))));
                        }
                        else
                        {
                            hexagon.MoveY((int)(cy + (intervaly * (j - amounty / 2))));
                        }
                    }
                    else
                    {
                        if (j < amounty / 2)
                        {
                            hexagon.MoveY((int)(cy - (intervaly * (amounty / 2 - j)) + (radius + (radius * Math.Sin(30.0 * (Math.PI / 180.0))))));
                        }
                        else
                        {
                            hexagon.MoveY((int)(cy + (intervaly * (j - amounty / 2)) + (radius + (radius * Math.Sin(30.0 * (Math.PI / 180.0))))));
                        }
                    }
                    hexagon.Scale(scale);
                    hexagon.Parameters(0, 0, "A");
                    hexagon.Fade(0);
                    Color2 h = Color2.HSL2RGB((double)i / hexagons.Length, .7, .4);
                    hexagon.Color(h.red, h.green, h.blue);
                    hexagons[i][j] = hexagon;
                }
            }
            return hexagons;
        }
Ejemplo n.º 17
0
        public void Background()
        {
            //Instantiating the permanent ones
            Sprite delete = new Sprite(@"StarlogBG2.jpg", Sprite.layer.Background);

            Sprite bg = new Sprite(@"sb\bg\bg.jpg", Sprite.layer.Background);
            bg.Fade(beginning, 1);
            bg.Scale(0, scale);

            Sprite star = new Sprite(@"sb\bg\star.png");
            star.Fade(beginning, 1);

            Sprite ring = new Sprite(@"sb\bg\ring.png");
            ring.MoveY(258);
            ring.Fade(beginning, 1);

            Sprite[] perm = { bg, star, ring };

            Sprite starPulse = new Sprite(@"sb\bg\star.png");

            Sprite ringPulse = new Sprite(@"sb\bg\ring.png");
            ringPulse.MoveY(258);

            Sprite[][] hexagons = DrawHexagon();

            //The start and end of each section
            int start;
            int end;

            //reading the timing for each sections
            Queue<int> sections = LyricTiming(@"D:\Library\Game\osu!\Songs\334725 ChouCho - Starlog(Asterisk Remix)\ChouCho - Starlog(Asterisk Remix) (Depths) [sections].osu");

            //Each sections
            //Intro 1
            start = sections.Dequeue();
            end = sections.Dequeue();

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .2, beat * 16, .5);

            //Intro 2
            start = end;
            end = sections.Dequeue();

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Vocals A1
            start = end;
            end = sections.Dequeue();

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Vocals A2
            start = end;
            end = sections.Dequeue();

            FadeBackground(perm, start - beat, start, 1, 0);

            int f;
            f = start + (66154 - 66154);
            Flash(f);
            f = start + (66668 - 66154);
            Flash(f);
            f = start + (67183 - 66154);
            Flash(f);
            f = start + (67697 - 66154);
            Flash(f);

            f = start + (68897 - 66154);
            Flash(f);
            f = start + (69411 - 66154);
            Flash(f);
            f = start + (69926 - 66154);
            Flash(f);
            f = start + (70440 - 66154);
            Flash(f);

            f = start + (71640 - 66154);
            Flash(f);
            f = start + (72154 - 66154);
            Flash(f);
            f = start + (72326 - 66154);
            Flash(f);

            f = start + (73011 - 66154);
            Flash(f);
            f = start + (73268 - 66154);
            Flash(f);
            f = start + (73526 - 66154);
            Flash(f);

            f = start + (73697 - 66154);
            Flash(f);
            f = start + (73954 - 66154);
            Flash(f);
            f = start + (74211 - 66154);
            Flash(f);

            f = start + (68211 - 66154);
            Flash(f);
            f = start + (68554 - 66154);
            Flash(f);

            f = start + (70954 - 66154);
            Flash(f);
            f = start + (71297 - 66154);
            Flash(f);

            f = start + (74383 - 66154);
            Flash(f);
            f = start + (74897 - 66154);
            Flash(f);

            f = start + (75411 - 66154);
            Flash(f);
            f = start + (75497 - 66154);
            Flash(f);
            f = start + (75585 - 66154);
            Flash(f);

            f = start + (75926 - 66154);
            Flash(f);
            f = start + (76097 - 66154);
            Flash(f);

            //KiaiA1
            start = end;
            end = sections.Dequeue();

            FadeBackground(perm, start - beat, start, 0, 1);

            FlashHexagons(hexagons, start, end);
            DrawShootingStar(start, end);

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //KiaiA2
            start = end;
            end = sections.Dequeue();

            FlashHexagons(hexagons, start, end);
            DrawShootingStar(start, end);

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Transition A2
            start = end;
            end = sections.Dequeue();

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Quiet A
            start = end;
            end = sections.Dequeue();

            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Vocal B1
            start = end;
            end = sections.Dequeue();

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Vocal B2
            start = end;
            end = sections.Dequeue();

            FadeBackground(perm, start - beat, start, 1, 0);

            f = start + (66154 - 66154);
            Flash(f);
            f = start + (66668 - 66154);
            Flash(f);
            f = start + (67183 - 66154);
            Flash(f);
            f = start + (67697 - 66154);
            Flash(f);

            f = start + (68897 - 66154);
            Flash(f);
            f = start + (69411 - 66154);
            Flash(f);
            f = start + (69926 - 66154);
            Flash(f);
            f = start + (70440 - 66154);
            Flash(f);

            f = start + (71640 - 66154);
            Flash(f);
            f = start + (72154 - 66154);
            Flash(f);
            f = start + (72326 - 66154);
            Flash(f);

            f = start + (73011 - 66154);
            Flash(f);
            f = start + (73268 - 66154);
            Flash(f);
            f = start + (73526 - 66154);
            Flash(f);

            f = start + (73697 - 66154);
            Flash(f);
            f = start + (73954 - 66154);
            Flash(f);
            f = start + (74211 - 66154);
            Flash(f);

            f = start + (68211 - 66154);
            Flash(f);
            f = start + (68554 - 66154);
            Flash(f);

            f = start + (70954 - 66154);
            Flash(f);
            f = start + (71297 - 66154);
            Flash(f);

            f = start + (74383 - 66154);
            Flash(f);
            f = start + (74897 - 66154);
            Flash(f);

            f = start + (75411 - 66154);
            Flash(f);
            f = start + (75497 - 66154);
            Flash(f);
            f = start + (75585 - 66154);
            Flash(f);

            f = start + (75926 - 66154);
            Flash(f);
            f = start + (76097 - 66154);
            Flash(f);

            //Kiai B1
            start = end;
            end = sections.Dequeue();

            FadeBackground(perm, start - beat, start, 0, 1);

            FlashHexagons(hexagons, start, end);
            DrawShootingStar(start, end);

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Kiai B2
            start = end;
            end = sections.Dequeue();

            FlashHexagons(hexagons, start, end);
            DrawShootingStar(start, end);

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Quiet B1
            start = end;
            end = sections.Dequeue();

            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Quiet B2
            start = end;
            end = sections.Dequeue();

            Sprite[] t1 = { star, ring };
            FadeBackground(perm, start - beat * 6.5, start - beat * 5.5, 1, 0);

            Pulse(ringPulse, start + beat * 4, end, .8, beat * 8, 1);

            //Vocal C1
            start = end;
            end = sections.Dequeue();

            Sprite[] t2 = { bg };

            FadeBackground(t2, start, end, 0, 1);
            FadeBackground(t1, start, start + beat / 2, 0, 1);
            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //KiaiC2
            start = end;
            end = sections.Dequeue();

            FlashHexagons(hexagons, start + beat, end);
            DrawShootingStar(start + beat, end);

            Pulse(starPulse, start + beat, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Transition B2
            start = end;
            end = sections.Dequeue();

            FlashHexagons(hexagons, start, end - 100);

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Outro 1
            start = end;
            end = sections.Dequeue();

            FlashHexagons(hexagons, start, end - 100);

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Outro 2
            start = end;
            end = ending;

            Pulse(starPulse, start, end, .2, beat, 1);
            Pulse(ringPulse, start, end, .8, beat * 4, 1);

            //Others
            DrawKeyboard();
            DrawFirework();
            FadeBackground(perm, ending, ending + beat, 1, 0);
            Wave(3068);
            Wave(8554);
            Wave(14040);
            Wave(19526);
        }
Ejemplo n.º 18
0
 public static void MoveCircular(Sprite light, double startTime, double endTime, int startAngle, int endAngle, int radius, int originStartX, int originStartY, int originEndX, int originEndY, int accuracy)
 {
     MoveCircular(light, startTime, endTime, startAngle, endAngle, radius, originStartX, originStartY, originEndX, originEndY, accuracy, false);
 }
Ejemplo n.º 19
0
 public void Flash(int startTime)
 {
     Sprite white = new Sprite(@"sb\etc\p.png", Sprite.origin.BottomCentre);
     white.Fade(startTime, startTime + beat / 2, .7, 0);
     white.Scale(startTime, scale);
     white.Move(startTime, 320, 480);
     Color2 c = Color2.HSL2RGB(rand.Next(1, 100) / 100.0, .4, .8);
     white.Color(startTime, c.red, c.green, c.blue);
     white.Parameters(startTime, startTime, "A");
 }
Ejemplo n.º 20
0
 public void Blink(Sprite line, double startTime, double endTime, int frequency)
 {
     double time = startTime;
     while (time + 600< endTime)
     {
         int interval = rand.Next(10, 600);
         line.Fade(time, time + interval / 2, 1, 0);
         line.Fade(time + interval / 2, time + interval, 1, 0);
         time += interval;
     }
 }
Ejemplo n.º 21
0
 public static void MoveCircular(Sprite light, double startTime, double endTime, int startAngle, int endAngle, int radius, int x, int y, int accuracy, bool rotate)
 {
     MoveCircular(light, startTime, endTime, startAngle, endAngle, radius, x, y, x, y, accuracy, rotate);
 }
Ejemplo n.º 22
0
 public void FlashHexagons(Sprite[][] hexagon, double startTime, double endTime)
 {
     for (double i = startTime; i < endTime; i += beat)
     {
         for (int j = 0; j < hexagon.Length; j++)
         {
             for (int k = 0; k < hexagon[j].Length; k++)
             {
                 if (Util.random(10))
                 {
                     hexagon[j][k].Fade(i, i + beat / 4, 0, 1);
                     hexagon[j][k].Fade(i + beat * 3 / 4, i + beat, 1, 0);
                 }
             }
         }
     }
 }
Ejemplo n.º 23
0
 public static void MoveCircular(Sprite light, double startTime, double endTime, int startAngle, int endAngle, int radius, int originStartX, int originStartY, int originEndX, int originEndY, bool rotate)
 {
     MoveCircular(light, startTime, endTime, startAngle, endAngle, radius, originStartX, originStartY, originEndX, originEndY, 30, rotate);
 }
Ejemplo n.º 24
0
 public Sprite GenerateParticles(int r)
 {
     Sprite p;
     switch (r)
     {
         case 1:
             p = new Sprite(@"sb\etc\hexagon.png");
             p.Scale(.2);
             return p;
         case 2:
             p = new Sprite(@"sb\etc\petal1.png");
             p.Scale(.6);
             return p;
         case 3:
             p = new Sprite(@"sb\etc\petal2.png");
             p.Scale(.6);
             return p;
         case 4:
             p = new Sprite(@"sb\etc\petal3.png");
             p.Scale(.6);
             return p;
         case 5:
             p = new Sprite(@"sb\etc\petal4.png");
             p.Scale(.6);
             return p;
         case 6:
             p = new Sprite(@"sb\etc\petal5.png");
             p.Scale(.6);
             return p;
         case 7:
             p = Mathematics.DrawLines(0, 10, 40);
             return p;
         default:
             p = new Sprite(@"sb\etc\hexagon.png");
             p.Scale(.6);
             return p;
     }
 }
Ejemplo n.º 25
0
 public static void MoveCurve(Sprite light, double startTime, double endTime, int angle1, int angle2, int xc, int yc, double offsetx, double offsety, int radius)
 {
     var radangle1 = angle1 * (Math.PI / 180.0);
     var radangle2 = angle2 * (Math.PI / 180.0);
     int x1 = (int)(radius * Math.Sin(radangle1 - Math.PI / 2) + xc);
     int y1 = (int)(radius * Math.Sin(radangle1) + yc);
     int x2 = (int)(radius * Math.Sin(radangle2 - Math.PI / 2) + xc - offsetx);
     int y2 = (int)(radius * Math.Sin(radangle2) + yc - offsety);
     light.Move(startTime, endTime, x1, y1, x2, y2);
 }
Ejemplo n.º 26
0
 public void Pulse(Sprite s, double startTime, double endTime, double size, double interval, double length)
 {
     double sc = s.GetScale();
     for (double currTime = startTime; currTime < endTime - 100; currTime += interval)
     {
         s.Scale(currTime, currTime + interval * length, sc, sc + size);
         s.Fade(4, currTime, currTime + interval * length, 1, 0);
     }
     s.currentScale = sc;
 }