// ナズーリンの基本設定＆関数まとめ

let imgBoss	= GetCurrentScriptDirectory() ~ "\img\mychara.png";

//魔方陣
let CC_RED	= 255;
let CC_GREEN	= 128;
let CC_BLUE	= 128;

#include_function ".\lib\common.txt"

// グラフィックの設定
sub setGraphicStop  { SetGraphicRect(192,  32, 256, 128); }
sub setGraphicLeft  { SetGraphicRect(256,  32, 320, 128); }
sub setGraphicRight { SetGraphicRect(320,  32, 384, 128); }
sub setGraphicAttack{ SetGraphicRect(384,  32, 448, 128); }

sub setGraphicMove {
	if(GetSpeedX == 0) {
		setGraphicStop;
	} else if(GetSpeedX < 0) {
		setGraphicLeft;
	} else {
		setGraphicRight;
	}
}

sub Draw_Nazu
{
	if(GetSpeedX == 0) {
		if (ATTACK_FLAG)
		{
			setGraphicAttack;
		}
		else
		{
			setGraphicStop;
		}
	} else if(GetSpeedX < 0) {
		setGraphicLeft;
	} else {
		setGraphicRight;
	}
	
	DrawGraphic(GetX, GetY);
}
