How do i shoot a gun when the user touches the screen . This is my code :
I also want to change where it says minigun.enterFrame because I will have more than one gun in the game so can I also get help with that too ? Thanks
function activateGun( self, event )
self:shootGun()
end
function touchScreen( event )
if event.phase == “began” then
minigun.enterFrame = activateGun
Runtime: addEventListener(“enterFrame”, minigun)
end
if event.phase == “ended” then
Runtime: removeEventListener(“enterFrame”, minigun)
end
end