#TouhouDanmakufu
#Title[Drawing2D]
#Text[Drawing2D Test]
#PlayLevel[Easy]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main
{
let alpha = 255;
let angle = 360;
let scale = 2;
let flag = 0;
let carriage = GetCurrentScriptDirectory~"\img\carriage.bmp";
let turret = GetCurrentScriptDirectory~"\img\turret.bmp";
@Initialize
{
SetX(GetCenterX);
SetY(GetClipMinY + 100);
LoadGraphic(carriage);
LoadGraphic(turret);
SetLife(2000);
}
@MainLoop
{
SetCollisionA(GetCenterX, 100, 16);
}
@DrawLoop
{
SetTexture(carriage);
SetGraphicRect(0, 0, 32, 32);
SetAlpha(255);
SetGraphicAngle(0, 0, 0);
SetGraphicScale(1, 1);
DrawGraphic(GetCenterX, 100);
SetTexture(turret);
SetGraphicRect(0, 0, 34, 34);
SetAlpha(alpha);
SetGraphicAngle(0, 0, angle);
SetGraphicScale(1, 1);
DrawGraphic(GetCenterX, 100);
DrawText("Alpha", GetCenterX-16, 160, 12, 255);
SetTexture(carriage);
SetGraphicRect(0, 0, 32, 32);
SetAlpha(255);
SetGraphicAngle(0, 0, 0);
SetGraphicScale(2, 2);
DrawGraphic(100, 100);
SetTexture(turret);
SetGraphicRect(0, 0, 34, 34);
SetAlpha(255);
SetGraphicAngle(0, 0, angle);
SetGraphicScale(scale, scale);
DrawGraphic(100, 100);
DrawText("Scale", 100-16, 160, 12, 255);
SetTexture(carriage);
SetGraphicRect(0, 0, 32*2, 32*2);
SetAlpha(255);
SetGraphicAngle(0, 0, 0);
SetGraphicScale(1, 1);
DrawGraphic(348, 100);
SetTexture(turret);
SetGraphicRect(0, 0, 34, 34);
SetAlpha(255);
SetGraphicAngle(0, 0, angle);
SetGraphicScale(1, 1);
DrawGraphic(348+16, 100-16);
DrawGraphic(348-16, 100-16);
DrawGraphic(348-16, 100+16);
DrawGraphic(348+16, 100+16);
DrawText("Tile", 348-16, 160, 12, 255);
DrawText("alpha =", 70, 200, 12, 255);
DrawText(alpha, 115, 200, 12, 255);
DrawText("scale =", 70, 220, 12, 255);
DrawText(scale, 115, 220, 12, 255);
DrawText("angle =", 70, 240, 12, 255);
DrawText(angle, 115, 240, 12, 255);
angle -= 0.75;
if(0 == angle)
{
angle = 360;
}
if(0 == flag)
{
alpha -= 8.5;
scale -= 0.06;
if(alpha <= 0)
{
flag = 1;
}
}
else
{
alpha += 8.5;
scale += 0.06;
if(alpha >= 255)
{
flag = 0;
}
}
}
@Finalize
{
DeleteGraphic(carriage);
DeleteGraphic(turret);
}
}
#Title[Drawing2D]
#Text[Drawing2D Test]
#PlayLevel[Easy]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main
{
let alpha = 255;
let angle = 360;
let scale = 2;
let flag = 0;
let carriage = GetCurrentScriptDirectory~"\img\carriage.bmp";
let turret = GetCurrentScriptDirectory~"\img\turret.bmp";
@Initialize
{
SetX(GetCenterX);
SetY(GetClipMinY + 100);
LoadGraphic(carriage);
LoadGraphic(turret);
SetLife(2000);
}
@MainLoop
{
SetCollisionA(GetCenterX, 100, 16);
}
@DrawLoop
{
SetTexture(carriage);
SetGraphicRect(0, 0, 32, 32);
SetAlpha(255);
SetGraphicAngle(0, 0, 0);
SetGraphicScale(1, 1);
DrawGraphic(GetCenterX, 100);
SetTexture(turret);
SetGraphicRect(0, 0, 34, 34);
SetAlpha(alpha);
SetGraphicAngle(0, 0, angle);
SetGraphicScale(1, 1);
DrawGraphic(GetCenterX, 100);
DrawText("Alpha", GetCenterX-16, 160, 12, 255);
SetTexture(carriage);
SetGraphicRect(0, 0, 32, 32);
SetAlpha(255);
SetGraphicAngle(0, 0, 0);
SetGraphicScale(2, 2);
DrawGraphic(100, 100);
SetTexture(turret);
SetGraphicRect(0, 0, 34, 34);
SetAlpha(255);
SetGraphicAngle(0, 0, angle);
SetGraphicScale(scale, scale);
DrawGraphic(100, 100);
DrawText("Scale", 100-16, 160, 12, 255);
SetTexture(carriage);
SetGraphicRect(0, 0, 32*2, 32*2);
SetAlpha(255);
SetGraphicAngle(0, 0, 0);
SetGraphicScale(1, 1);
DrawGraphic(348, 100);
SetTexture(turret);
SetGraphicRect(0, 0, 34, 34);
SetAlpha(255);
SetGraphicAngle(0, 0, angle);
SetGraphicScale(1, 1);
DrawGraphic(348+16, 100-16);
DrawGraphic(348-16, 100-16);
DrawGraphic(348-16, 100+16);
DrawGraphic(348+16, 100+16);
DrawText("Tile", 348-16, 160, 12, 255);
DrawText("alpha =", 70, 200, 12, 255);
DrawText(alpha, 115, 200, 12, 255);
DrawText("scale =", 70, 220, 12, 255);
DrawText(scale, 115, 220, 12, 255);
DrawText("angle =", 70, 240, 12, 255);
DrawText(angle, 115, 240, 12, 255);
angle -= 0.75;
if(0 == angle)
{
angle = 360;
}
if(0 == flag)
{
alpha -= 8.5;
scale -= 0.06;
if(alpha <= 0)
{
flag = 1;
}
}
else
{
alpha += 8.5;
scale += 0.06;
if(alpha >= 255)
{
flag = 0;
}
}
}
@Finalize
{
DeleteGraphic(carriage);
DeleteGraphic(turret);
}
}