This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------------------------------------------------------------- | |
-- | |
-- modal.lua | |
-- | |
-- Modal dialog for Corona SDK | |
-- V. Sergeyev | |
-- | |
-- Usage: | |
-- showDialog("You completed the level. \n1st place.", "Next level", "level2", beforeNext) | |
-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 | |
-- |
NewerOlder