env variables are placed within App.env
.
SHOW_TOUCHABLES = false
SOUND_OFF = false
Override them in your App.start(options)
{options = {env = {"SOUND_OFF": true}}}
if(App.env.SOUND_OFF) then ... end
if(App.env.YOUR_CUSTOM_VAR) then ... end
you should create a src/env.lua
and choose the ENV from it.
example:
return {
DEVELOPMENT = {
name = 'development',
-- Cherry overrides
SOUND_OFF = true,
-- Custom
INVINCIBLE = true,
},
PRODUCTION = {
name = 'production'
-- Custom
INVINCIBLE = false
}
}
then require your env
to set the chosen one in your start options:
local env = require 'src/env.lua'
App.start({env = env.PRODUCTION})