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; }
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); }
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); }