示例#1
0
        // Instance Constructor
        public Raindrop(double heightInp = 1, double fadeInp = 1)
        {
            // Height ratio and fade setting are defined
            // upon declaration of the raindrop.
            imagePath = "sb\\rd.png";
            heightRatio = heightInp;
            fadeSetting = fadeInp;
            x = 0;
            y = 0;
            currentAngle = 0;
            angleOffset = 0;

            // Make sprite.
            droplet = SB.Sprite(imagePath, SB.Foreground, SB.TopCentre);

            // Apply settings
            if(heightInp != 1 && fadeInp != 1)
                applyRoll(0, heightRatio, fadeSetting);
        }
示例#2
0
        // Instance Constructor
        public Raindrop(double heightInp = 1, double fadeInp = 1)
        {
            // Height ratio and fade setting are defined
            // upon declaration of the raindrop.
            imagePath    = "sb\\rd.png";
            heightRatio  = heightInp;
            fadeSetting  = fadeInp;
            x            = 0;
            y            = 0;
            currentAngle = 0;
            angleOffset  = 0;

            // Make sprite.
            droplet = SB.Sprite(imagePath, SB.Foreground, SB.TopCentre);

            // Apply settings
            if (heightInp != 1 && fadeInp != 1)
            {
                applyRoll(0, heightRatio, fadeSetting);
            }
        }