Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Creation (Objects sourcefile)
  2.  
  3.   ElseIf sort = #wpnTriple
  4.     ;Debug ListSize(Shots())
  5.     For bTemp = 1 To 3
  6.       AddElement(Shots())
  7.       Shots()\sort = #wpnTriple : Shots()\spr = #sprSkott
  8.       Shots()\x = x : Shots()\y = y
  9.       Shots()\cx = 0 : Shots()\cy = 0 : Shots()\cw = 8 : Shots()\ch = 8
  10.       Shots()\speed = 30 : Shots()\dmg = Ship\wpndmg
  11.      
  12.       If bTemp = 1 : Shots()\movValX = 1 : Shots()\movValY = 1 ;Correct order or should it be x=1, y=-1?
  13.       ElseIf bTemp = 2 : Shots()\movValX = 1 : Shots()\movValY = 0
  14.       ElseIf bTemp = 3 : Shots()\movValX = 1 : Shots()\movValY = - 1
  15.       EndIf
  16.      
  17.       Sound(#sndBlst)
  18.     Next bTemp
  19.  
  20.  
  21.  
  22. ;Move/Deletion (Timers sourcefile)
  23.  
  24. ;-Bullets
  25.     ForEach Shots()
  26.       ;Move
  27.       If Timers\timNow => (Shots()\timMov + Timers\timMovDly)
  28.         If Shots()\ang = 0
  29.           If Shots()\movValX < 0
  30.             Shots()\x - Shots()\speed
  31.           ElseIf Shots()\movValX > 0
  32.             Shots()\x + Shots()\speed
  33.           EndIf
  34.           If Shots()\movValY < 0
  35.             Shots()\y - Shots()\speed
  36.           ElseIf Shots()\movValY > 0
  37.             Shots()\y + Shots()\speed
  38.           EndIf
  39.  
  40.         EndIf
  41.        
  42.         ;Outside screen (or Boss collision)
  43.         If Shots()\x < -32 Or Shots()\x > (Config\ScreenW + 32) Or Shots()\y < -32 Or Shots()\y > (Config\ScreenH + 32) Or SktBossCol()
  44.           DeleteElement(Shots(), 1) : Continue
  45.         EndIf
  46.        
  47.         ;Player collision
  48.         If Ship\exploding = #Off
  49.           If MonSktShipCol()
  50.             Ship\exploding ! 1 : Ship\liv - 1
  51.             Timers\timExplode = ElapsedMilliseconds() : Timers\timExplodeAnim = ElapsedMilliseconds()
  52.             Continue
  53.           EndIf
  54.         EndIf
  55.        
  56.         Shots()\timMov = Timers\timNow
  57.       EndIf
  58.     Next
  59.  
  60.  
  61.  
  62. ;Display (Video sourcefile)
  63.     ;Bullets
  64.     ForEach Shots()
  65.       If Shots()\x > (0 - Shots()\cw) And Shots()\x < (Config\ScreenW + Shots()\cw) And Shots()\y > (0 - Shots()\ch) And Shots()\y < (Config\ScreenH + Shots()\ch)
  66.         If Shots()\timAnm = 0
  67.           ClipSprite(Shots()\spr, Shots()\cx, Shots()\cy, Shots()\cw, Shots()\ch)
  68.         Else
  69.           ClipSprite(Shots()\spr, (Shots()\cx + (Shots()\cw * (Shots()\anmFrame))), Shots()\cy, Shots()\cw, Shots()\ch)
  70.         EndIf
  71.         DisplayTransparentSprite(Shots()\spr, Shots()\x, Shots()\y)
  72.       EndIf
  73.     Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement