Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- The bouncing bullets attack from the documentation example.
- timer = 0
- bullets = {}
- blasters = require "gaster_blaster"
- blue = require "bluesoul"
- function Update()
- timer = timer + 1
- if timer == 1 then
- --blue.Initialize()
- mask = CreateSprite("Attacks/MaskBox")
- mask.Scale(Arena.width/2, Arena.height/2)
- mask.MoveTo(Arena.width / 2, Arena.height / 2)
- mask.Mask("box")
- elseif timer == 75 then
- local bonetop = CreateProjectile("bones/Testboneshort", Arena.width, Arena.height - 75)
- table.insert(bullets, bonetop)
- timer = 0
- end
- for i=1, #bullets do
- local bonetop = bullets[i]
- bonetop.sprite.SetParent(mask)
- bonetop.MoveTo(bonetop.x - 2, bonetop.y)
- end
- blasters.Update()
- --blue.Update()
- end
- function OnHit()
- Player.Hurt(1, 0.05)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement