Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[AbyssEnemy1]
- #Text[Enemy1]
- #ScriptVersion[2]
- script_enemy_main {
- let x = 0;
- let dir = 0;
- let CSD = GetCurrentScriptDirectory;
- let Enemy1 = CSD ~ "IMG\Enemy1.png";
- @Initialize {
- LoadGraphic(Enemy1);
- SetX(GetClipMinX-25);
- SetY(GetCenterY-120);
- SetLife(500);
- mainTask;
- }
- @MainLoop {
- SetCollisionA(GetX, GetY, 24);
- SetCollisionB(GetX, GetY, 24);
- yield;
- }
- @DrawLoop {
- SetTexture(Enemy1);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicRect(0, 0, 63, 63);
- SetGraphicScale(1, 1);
- SetGraphicAngle(0, 0, 0);
- DrawGraphic(GetX, GetY);
- }
- @Finalize {
- CreateItem(ITEM_SCORE, GetX, GetY);
- while(x<256) {
- CreateShot01(GetX+50*cos(dir), GetY+50*sin(dir*2), 2, dir, RED04, 10);
- x++;
- dir+=3;
- wait(2);
- }
- }
- task mainTask {
- SetMovePosition01(GetClipMaxX+25, GetCenterY, 1.5);
- }
- function wait(w) {
- loop(w) { yield; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement