public void draw(){
		if(drawable){
			if(currentspriteexists()){//aka, if we have a sprite that exists, and we have not decided to draw bounds instead
				if(drawmode==2){//if we clip the image to within it's bounds
					mainscreen.screengraphics.drawImage(image.get(currentspritenumber).getimage(), (int)(x+spriteoffsetx), (int)(y+spriteoffsety), (int)(x+spriteoffsetx+boundsx), (int)(y+spriteoffsety+boundsy), (int)(spriteoffsetx), (int)(spriteoffsety), (int)(spriteoffsetx+boundsx), (int)(spriteoffsety+boundsy), null);
				}else if(drawmode==3){//we scale the image
					boolean drawsuccess=false;
					try{
						Image tempimage = image.get(currentspritenumber).getimage().getScaledInstance((int)(getsizex()), (int)(getsizey()), Image.SCALE_FAST);
						do{
							drawsuccess = mainscreen.screengraphics.drawImage(tempimage, (int)(x+spriteoffsetx), (int)(y+spriteoffsety), null);
						}while(!drawsuccess);
					}catch(Exception e){}
				}else{
					mainscreen.screengraphics.drawImage(image.get(currentspritenumber).getimage(), (int)(x+spriteoffsetx), (int)(y+spriteoffsety),null);
				}
			}else{//we draw the image normally, taking in to account any offsets that we wish to use.
				mainscreen.screengraphics.setColor(drawcolor);
				mainscreen.screengraphics.drawRect((int)(x), (int)(y), (int)boundsx, (int)boundsy);
			}//end of drawmode checks
		}//end of ifdrawable
		//allows us to draw the bounds of the object too.
		if(debugbounds){mainscreen.screengraphics.setColor(drawcolor);
						mainscreen.screengraphics.drawRect((int)(x), (int)(y), (int)getsizex(), (int)getsizey());}
	}