Esempio n. 1
0
        private static void new_slice(string image, int xpos, int ypos, int left)
        {
            var imagename = "sb/ct/" + image + ".png"; //Append

            var letter = new SpriteEvent(imagename, Background, BottomLeft);

            storyboard.AddSpriteEvent(letter);
            const int starttime  = 430004;
            const int endtime    = 432082;
            const int addendum   = 0;
            const int xposmodmin = 100;
            const int xposmodmax = 210;

            letter.Move(starttime, new Position(xpos, ypos));
            letter.MoveY(starttime + addendum, endtime + addendum, Out, ypos, rand.Next(1150, 1250));
            letter.Fade(starttime, 1);
            letter.Fade(starttime + addendum, 430682, Out, 1, 0);

            if (left == 1)
            {
                letter.MoveX(starttime + addendum, endtime + addendum, In, xpos, xpos - rand.Next(xposmodmin, xposmodmax));
            }
            else
            {
                letter.MoveX(starttime + addendum, endtime + addendum, In, xpos, xpos + rand.Next(xposmodmin, xposmodmax));
            }
            var sign = rand.Next(0, 1);

            if (sign == 0)
            {
                sign = -1;
            }
            else
            {
                sign = 1;
            }

            letter.Rotate(starttime + addendum, endtime + addendum, In, 0, sign * randdiv(500, 4600, 1000));
        }