Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- spawntimer = 0
- bullets = {}
- function OnHit(bullet)
- Player.Hurt(2)
- end
- function Update()
- spawntimer = spawntimer + 1
- if spawntimer%27 == 0 then
- local bullet = CreateProjectile('Wandering_Eye_Vestical', Player.x, Arena.height)
- bullet.SetVar('velx', 0)
- bullet.SetVar('vely', -10)
- table.insert(bullets, bullet)
- end
- for i=1,#bullets do
- local bullet = bullets[i]
- local velx = bullet.GetVar('velx')
- local vely = bullet.GetVar('vely')
- local newposx = bullet.x + velx
- local newposy = bullet.y + vely
- bullet.MoveTo(newposx, newposy)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement