let img=GetCurrentScriptDirectory~"img\lilyw_sprite.png";
LoadGraphic(img);
let anim=0;
let animb=0;
let drawangle=0;

sub anim_idle{
	SetTexture(img);
	if(GetSpeedX<0){
		animb++;
		anim=0;
		if(animb>=18){animb=17;}
		SetGraphicRect(floor(animb/6)*64, 64, floor(animb/6)*64+64, 128);
		SetGraphicAngle(180, 0, 0);
	}else if(GetSpeedX>0){
		animb++;
		anim=0;
		if(animb>=18){animb=17;}
		SetGraphicRect(floor(animb/6)*64, 64, floor(animb/6)*64+64, 128);
		SetGraphicAngle(0, 0, 0);
	}else{
		anim++;
		animb=0;
		if(animb>=20){animb=19;}
		SetGraphicRect(floor(animb/5)*64, 0, floor(animb/5)*64+64, 64);
		SetGraphicAngle(0, 0, 0);
	}
	SetGraphicScale(1, 1);
	SetAlpha(255);
	SetColor(255, 255, 255);
	DrawGraphic(GetX, GetY+5*sin(drawangle));
	drawangle+=3;
}