/*-----d͐ݒ--------------------------*/
GSet(global.G,90,0,0,0,0,0,0);

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

/*-----[V̏--------------------*/
if(RECV_DAMAGE){
	playEnemySound(SOUND_DAMAGE);
}

INV = 1;
if(!ChangeMotion){
	switch(MotionNum){
		case STAND :
			if(!isGameOver()){
				if(270-30<playerDirection && playerDirection<270+30 ){
					if( 200>playerDistance ) MotionChange(ATTACK,0,2);
				}
			}
			break;
		case ATTACK :
			INV = 0;
			if(MOTIONEND) MotionChange(INTO,0,2);
			break;
		case INTO :
			if(MOTIONEND) MotionChange(STAND,0,1);
			break;
		/*-----------------------------*/
		case DEAD_MOTION :
			if(KeyFrmNum==1 && KEYFRAME){
				sound_play(sndHit02);
				Fluid(x,y,make_color_rgb(163,73,164),35,5,20,0,180,0.5);
				Quake(5,5);
			}
			if(MOTIONEND){
				effect_create_above(ef_explosion,x,y,1,make_color_rgb(163,73,164));
				Flash(c_white,0.1,0.05);
				Fluid(x,y-64,make_color_rgb(163,73,164),35,5,20,0,180,0.5);
				Quake(5,5);
				sound_play(sndFluid);
				instance_destroy();
			}
			break;
	}
}