Advertisement
Guest User

Enemy1.txt

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