/*-----d͐ݒ--------------------------*/
GSet(0,0,0.95,0.95, 0,0,0.95,0.95);

with(objEnemyEdit){ if(Edit_Play) exit; }
/*-----LN^Ƃ̏̎擾---------------*/
playerDistanceX = abs(x - objPlayerDoll.x);
playerDistance = point_distance(x,y,objPlayerDoll.x,objPlayerDoll.y);
playerDirection = point_direction(x,y,objPlayerDoll.x,objPlayerDoll.y);

/*-----[V̏--------------------*/
DepthSet(objPlayerDoll.depth + 1000);
if(!ChangeMotion){
	switch(MotionNum){
		case STAND :
			if(place_free(objPlayerDoll.x - 256*objPlayerDoll.Direction,objPlayerDoll.y - 256)){
				tmp_dis = point_distance( x,y,objPlayerDoll.x - 256*objPlayerDoll.Direction,objPlayerDoll.y - 256);
				tmp_dir = point_direction(x,y,objPlayerDoll.x - 256*objPlayerDoll.Direction,objPlayerDoll.y - 256);
			}else{
				tmp_dis = point_distance( x,y,objPlayerDoll.x + 256*objPlayerDoll.Direction,objPlayerDoll.y - 256);
				tmp_dir = point_direction(x,y,objPlayerDoll.x + 256*objPlayerDoll.Direction,objPlayerDoll.y - 256);
			}
			motion_add(tmp_dir, min( 3, (tmp_dis/300.0)) );

			if(keyboard_check(vk_space)) MotionChange(CATCH,0,5);

			/* ̕ */
			if(objPlayerDoll.x > x){
				if(Direction != Right) MotionChange(TURN,0,2);
			}else{
				if(Direction != Left ) MotionChange(TURN,0,2);
			}
			break;
		case CATCH:
			STRING_IS_AUTO_ANIME[0] = 0;
			if(MOTIONEND){
				STRING_IS_AUTO_ANIME[0] = 1;
				for(i=0;i<strLen;i+=1){
					if(Direction) STRING_ANG[0,i] = (PartsParam(PARTS_STRING[0,i])).image_angle;
					else          STRING_ANG[0,i] =-(PartsParam(PARTS_STRING[0,i])).image_angle + 180;
					STRING_ANG_SPD[0,i] = 0;

					STRING_HSPD[0,i] = 0; STRING_VSPD[0,i] = 0;
					STRING_HACC[0,i] = 0; STRING_VACC[0,i] = 0;

					STRING_PRE_HSPD[0,i] = STRING_HSPD[0,i];
					STRING_PRE_VSPD[0,i] = STRING_VSPD[0,i];

					STRING_XPOS[0,i] = (PartsParam(PARTS_STRING[0,i])).x;
					STRING_YPOS[0,i] = (PartsParam(PARTS_STRING[0,i])).y;
					STRING_PRE_XPOS[0,i] = STRING_XPOS[0,i];
					STRING_PRE_YPOS[0,i] = STRING_YPOS[0,i];
				}
				MotionChange(STAND,0,2);
			}
			break;
		case TURN:
			if(KeyFrmNum == 3 && KEYFRAME){
				Direction *= -1;
				AngleBlurOff = true;
			}
			if(MOTIONEND) MotionChange(STAND,0,2);
			break;
		case DEAD_MOTION:
			if(MOTIONEND){
				MotionChange(DEAD_MOTION2,0,3);
			}
			break;
	}
}

/*
	case HATCHETS_FINISH :
		with(PartsParam(PARTS_BODY)){ depth = objPlayerDoll.depth + 1001; }
		break;
	Line = drawLine(x,y+180,x+Direction*-200,y+280);
	Line.Color = c_red; Line.Width = 3; Line.depth = -1000000;
*/