using System; namespace SSWProject { /// /// Summary description for Class. /// public class Ball { private const float grav = 5.81F; private float px; private float py; private float speedx; private float speedy; private float time; private int windspeed; public Ball(int px, int py, int wind, float sx, float sy ) { this.px = px; this.py = py; this.speedy = sy; this.speedx = sx; this.windspeed = wind; this.time = 0.01F; } public void Next() { this.time += 0.01F; this.speedy -= (float)Math.Pow(time,2) * grav; this.speedx += (float)this.windspeed / 10; px += speedx / 20; py -= speedy / 20; } public int getX() { return (int)this.px; } public int getY() { return (int)this.py; } } }