The "shooter" subclass
class Shooter : Box
{
public bool goleft;
public bool goright;
public Shooter(float startx, float starty)
{
pic = resizeImage (Properties.Resources.shooter, new Size(50,50)); // resize image
goleft = false;
goright = false;
x = startx;
y = starty;
}
And this is the main class from which it inherited the code.
class Box
{
public Image pic;
public float x;
public float y;
public int speed;
public Box()
{
x = 0;
y = 0;
speed = 0;
}
// Image Resizing Code
public static Image resizeImage(Image imgToResize, Size size)
{
return (Image)(new Bitmap(imgToResize, size));
}
// image resizing code
public void Draw(Graphics g)
{
g.DrawImage(pic, x, y);
}
// some code bellow that basically states the borders and hit boxes.
}
So, yeah, I'm just trying to figure out how to animate a gif which is essentially built by a constructor... The shooter shows up, I can move it around but the problem is, is that it's just not spinnin'. Hope you guys can figure it out. Thanks :D