Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

GGTweak

GGTweak allows you to store data in JSON format on a remote web server to be used in your Corona SDK apps. This allows you to tweak the values whenever you want. Very useful during development. Could be used to store values for balancing in live games as well.

Basic Usage

Require the code
local GGTweak = require( "GGTweak" )
Create your tweak library, passing in a url, callback function and refresh time.
local tweak = GGTweak:new( "http://localhost/data.json", onRefresh, 1000 )
Get a value
print( tweak:get( "testValue" ) )
Print a value in the refresh function.
local onRefresh = function()
	print( tweak:get( "testValue" ) )
end
Force a refresh
tweak:refresh()
Stop the refresh timer
tweak:stopRefreshTimer()
Restart the refresh timer
tweak:startRefreshTimer()
Create a library and load data locally. Useful when you already have confirmed your values for live apps.
local tweak = GGTweak:new( nil, onRefresh )
tweak:loadLocalData( "localData.json" )
Destroy the library
tweak:destroy()
tweak = nil

Update History

0.1

Initial release

About

GGTweak allows you to store data in JSON format on a remote web server to be used in your Corona SDK apps.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors