#Title[永江衣玖インターバル]
#Text[永江衣玖インターバル]
#BackGround[User]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
        let count=0;
	let AnimationB=0;
	let AnimationC=0;
        let csd     = GetCurrentScriptDirectory;
        let imgBoss =csd~"img\dot_iku.png";

    @Initialize {

        SetLife(1);
        SetTimer(999);
	SetEnemyMarker(true);

        SetInvincibility(500);
	LoadGraphic(imgBoss);
        TAnime1;
    }

        @MainLoop
        {
	if(count==100){
		AddLife(-1000);
		}
        SetCollisionB(GetX(),GetY(),18);
	SetCollisionA(GetX(),GetY(),18);
        count++;
        yield;
        }

        @DrawLoop {
		SetRenderState(ALPHA);
		SetTexture(imgBoss);
		SetGraphicScale(1,1);
		SetAlpha(255);
		SetColor(255,255,255);
		SetGraphicAngle(0,0,0);
		SetGraphicRect(128*AnimationC,128*AnimationB,127+128*AnimationC,127+128*AnimationB);
		DrawGraphic(GetX(),GetY());
	}

        @Finalize
        {
        }

    	task TAnime1{
		loop{
			AnimationB=0;
			AnimationC=0;
        		loop(10){yield;}
			AnimationB=1;
        		loop(10){yield;}
			AnimationB=2;
        		loop(10){yield;}
			}
		}
}