Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function jump(event)
- if event.phase == "began" then
- jumpTimer = timer.performWithDelay(10, function() jumpHeight=jumpHeight+5 end, -1)
- elseif event.phase == "ended" then
- player:setLinearVelocity(1, 500 * -1)
- player:applyAngularImpulse( 5 )
- timer.cancel(jumpTimer)
- jumpHeight = 100
- end
- end
- player:addEventListener("touch", jump)
Add Comment
Please, Sign In to add comment