Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WaveEffect("sb/pixel.png", "Foreground", 51606, 55651, new Vector2(0, 240), 100, 500, new Vector2(20, 20), 0.5);
- public void WaveEffect(String filepath, String layer, double startTime, double endTime, Vector2 startPos, double height, double duration, Vector2 scaleVec, double fadeOpac)
- {
- double posX = startPos.X;
- double posY = startPos.Y;
- double width = height * 2;
- var p = GetLayer(layer).CreateSprite(filepath);
- p.Fade(startTime, fadeOpac);
- p.ScaleVec(startTime, scaleVec);
- for (double time = startTime; time < endTime; time += duration)
- {
- p.MoveX(OsbEasing.None, time, time + duration / 2, posX, posX + width / 2);
- p.MoveX(OsbEasing.None, time + duration / 2, time + duration, posX + width / 2, posX + width);
- p.MoveY(OsbEasing.InOutSine, time, time + duration * 0.50, posY + height / 2, posY - height / 2);
- p.MoveY(OsbEasing.InOutSine, time + duration * 0.50, time + duration, posY - height / 2, posY + height / 2);
- // p.MoveY(OsbEasing.In, time, time + duration * 0.25, posY + height / 2, posY);
- // p.MoveY(OsbEasing.Out, time + duration * 0.25, time + duration * 0.50, posY, posY - height / 2);
- // p.MoveY(OsbEasing.In, time + duration * 0.50, time + duration * 0.75, posY - height / 2, posY);
- // p.MoveY(OsbEasing.Out, time + duration * 0.75, time + duration, posY, posY + height / 2);
- posX += width;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement