Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Creation (Objects sourcefile)
- ElseIf sort = #wpnTriple
- ;Debug ListSize(Shots())
- For bTemp = 1 To 3
- AddElement(Shots())
- Shots()\sort = #wpnTriple : Shots()\spr = #sprSkott
- Shots()\x = x : Shots()\y = y
- Shots()\cx = 0 : Shots()\cy = 0 : Shots()\cw = 8 : Shots()\ch = 8
- Shots()\speed = 30 : Shots()\dmg = Ship\wpndmg
- If bTemp = 1 : Shots()\movValX = 1 : Shots()\movValY = 1 ;Correct order or should it be x=1, y=-1?
- ElseIf bTemp = 2 : Shots()\movValX = 1 : Shots()\movValY = 0
- ElseIf bTemp = 3 : Shots()\movValX = 1 : Shots()\movValY = - 1
- EndIf
- Sound(#sndBlst)
- Next bTemp
- ;Move/Deletion (Timers sourcefile)
- ;-Bullets
- ForEach Shots()
- ;Move
- If Timers\timNow => (Shots()\timMov + Timers\timMovDly)
- If Shots()\ang = 0
- If Shots()\movValX < 0
- Shots()\x - Shots()\speed
- ElseIf Shots()\movValX > 0
- Shots()\x + Shots()\speed
- EndIf
- If Shots()\movValY < 0
- Shots()\y - Shots()\speed
- ElseIf Shots()\movValY > 0
- Shots()\y + Shots()\speed
- EndIf
- EndIf
- ;Outside screen (or Boss collision)
- If Shots()\x < -32 Or Shots()\x > (Config\ScreenW + 32) Or Shots()\y < -32 Or Shots()\y > (Config\ScreenH + 32) Or SktBossCol()
- DeleteElement(Shots(), 1) : Continue
- EndIf
- ;Player collision
- If Ship\exploding = #Off
- If MonSktShipCol()
- Ship\exploding ! 1 : Ship\liv - 1
- Timers\timExplode = ElapsedMilliseconds() : Timers\timExplodeAnim = ElapsedMilliseconds()
- Continue
- EndIf
- EndIf
- Shots()\timMov = Timers\timNow
- EndIf
- Next
- ;Display (Video sourcefile)
- ;Bullets
- ForEach Shots()
- 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)
- If Shots()\timAnm = 0
- ClipSprite(Shots()\spr, Shots()\cx, Shots()\cy, Shots()\cw, Shots()\ch)
- Else
- ClipSprite(Shots()\spr, (Shots()\cx + (Shots()\cw * (Shots()\anmFrame))), Shots()\cy, Shots()\cw, Shots()\ch)
- EndIf
- DisplayTransparentSprite(Shots()\spr, Shots()\x, Shots()\y)
- EndIf
- Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement