Skip to content

Instantly share code, notes, and snippets.

View nadar71's full-sized avatar
🏠
Working from home

Simone Mapelli nadar71

🏠
Working from home
View GitHub Profile
@nadar71
nadar71 / modal.lua
Last active August 29, 2015 14:14 — forked from vsergeyev/modal.lua
-----------------------------------------------------------------------------------------
--
-- modal.lua
--
-- Modal dialog for Corona SDK
-- V. Sergeyev
--
-- Usage:
-- showDialog("You completed the level. \n1st place.", "Next level", "level2", beforeNext)
--
-- Corona Game SDK example of how to let two bodies circle each other by applying a continuous, attracting force
--
-- The example uses the physics engine, sets gravity to 0, creates two balls separated in the x-direction,
-- with initial speeds in opposite y-direction.
-- Thru an enterFrame event handler, an attracting force is continuously applied to both balls with body:applyForce().
-- The force is normalized over the distance between the two balls.
-- By playing with the initial speed and force factors, you can make the balls spin faster/slower in circles or ellipses
--
-- Save this file as "main.lua" in a project directory and load it in the simulator
--