Guest User

dnh enemy1

a guest
Nov 15th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[AbyssEnemy1]
  3. #Text[Enemy1]
  4. #ScriptVersion[2]
  5.  
  6. script_enemy_main {
  7. let x = 0;
  8. let dir = 0;
  9. let Enemy1 = CSD ~ "IMG\Enemy1.png";
  10.  
  11. @Initialize {
  12. LoadGraphic(Enemy1);
  13. SetX(GetClipMinX-25);
  14. SetY(GetCenterY-120);
  15. SetLife(500);
  16. mainTask;
  17. }
  18.  
  19. @MainLoop {
  20. SetCollisionA(GetX, GetY, 24);
  21. SetCollisionB(GetX, GetY, 24);
  22. yield;
  23. }
  24.  
  25. @DrawLoop {
  26. SetTexture(Enemy1);
  27. SetRenderState(ALPHA);
  28. SetAlpha(255);
  29. SetGraphicRect(0, 0, 63, 63);
  30. SetGraphicScale(1, 1);
  31. SetGraphicAngle(0, 0, 0);
  32.  
  33. DrawGraphic(GetX, GetY);
  34. }
  35.  
  36. @Finalize {
  37. CreateItem(ITEM_SCORE, GetX, GetY);
  38. while(x<256) {
  39. CreateShot01(GetX+50*cos(dir), GetY+50*sin(dir*2), 2, dir, RED04, 10);
  40. x++;
  41. dir+=3;
  42. wait(2);
  43. }
  44. }
  45.  
  46. task mainTask {
  47. SetMovePosition01(GetClipMaxX+25, GetCenterY, 1.5);
  48. wait(1);
  49. VanishEnemy;
  50. }
  51.  
  52. function wait(w) {
  53. loop(w) { yield; }
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment