{
"name" : "Blocky Froggy",
"actions" : {
"onLaunch" : [ "push:game_wait", "push:welcome" ],
"onLaunchNew" : [ "push:game", "push:motd" ],
"onGameOver" : [ "goto:game_over" ]
},
"dialogs" : {
"character_select" :
{
"stage" : "selector",
"views" : [
{ "view" : "CaroselTest", "x" : 0, "y" : 0, "w" : 640, "h" : 960 }
],
"controls" : [
{ "type" : "Script", "lua" : "selector.lua" },
{ "type" : "Label", "x" : 230, "y" : 100, "text" : "Selector" },
{ "type" : "ToolButton", "x" : 10, "y" : 640, "icon" : 0, "actions" : { "onMouseClicked" : [ "exec:nextModel" ] } },
{ "type" : "ToolButton", "x" : 580, "y" : 640, "icon" : 1, "actions" : { "onMouseClicked" : [ "exec:prevModel" ] } },
{ "type" : "Button", "x" : 180, "y" : 740, "text" : "Okay", "actions" : { "onMouseClicked" : [ "goto:character_edit" ] } }
],
"actions" : {
"onTap" : [ "exec:tapped" ],
"onSwipeLeft" : [ "exec:nextModel" ],
"onSwipeRight" : [ "exec:prevModel" ]
}
},
"motd" :
{
"stage" : "motd",
"controls" : [
{ "type" : "Slider", "x" : 590, "y" : 105, "h" : 270, "binding" : "POS_SCALE" },
{ "type" : "Slider", "x" : 590, "y" : 390, "h" : 270, "binding" : "POS_BOUNDS" },
{ "type" : "Button", "x" : 180, "y" : 740, "text" : "Okay", "actions" : { "onMouseClicked" : [ "pop" ] } },
{ "type" : "Button", "x" : 180, "y" : 840, "text" : "Reset", "actions" : { "onMouseClicked" : [ "exec:resetMotd" ] } }
]
},
"welcome" :
{
"stage" : "blank",
"views" : [
{ "view" : "RotatingFrog", "x" : 50, "y" : 250, "w" : 640, "h" : 960 }
],
"controls" : [
{ "type" : "Image", "x" : 60, "y" : 170, "asset" : "splash1_.png" },
{ "type" : "Image", "x" : 315, "y" : 170, "asset" : "splash2_.png" },
{ "type" : "Image", "x" : 60, "y" : 425, "asset" : "splash3_.png" },
{ "type" : "Image", "x" : 315, "y" : 425, "asset" : "splash4_.png" },
{ "type" : "Label", "x" : 230, "y" : 100, "text" : "Welcome" },
{ "type" : "Button", "x" : 180, "y" : 740, "text" : "Okay", "actions" : { "onMouseClicked" : [ "pop" ] } }
]
},
"lua_test" :
{
"stage" : "blank",
"controls" : [
{ "type" : "Script", "lua" : "test.lua" },
{ "type" : "Label", "x" : 230, "y" : 100, "text" : "Lua Test" },
{ "type" : "Label", "x" : 180, "y" : 230, "text" : "${LUA_TEST_TEXT}" },
{ "type" : "Button", "x" : 180, "y" : 350, "text" : "Run", "actions" : { "onMouseClicked" : [ "exec:helloWorld" ] } },
{ "type" : "Button", "x" : 180, "y" : 740, "text" : "Okay", "actions" : { "onMouseClicked" : [ "exec:helloWorld" , "pop" ] } }
]
},
"animation" :
{
"stage" : "blank",
"controls" : [
{ "type" : "Rectangle", "x" : 0, "y" : 0, "w" : 640, "h" : 960, "r" : 4, "g" : 199, "b" : 0, "a" : 255,
"animations" : [
{ "timeScale" : 1000, "curve" : "linear", "loop" : "no", "parameter" : "a", "t0" : 255, "t1" : 0 }
] },
{ "type" : "Rectangle", "x" : 250, "y" : 300, "w" : 200, "h" : 200, "r" : 100, "g" : 255, "b" : 100, "a" : 255,
"animations" : [
{ "timeScale" : 800, "curve" : "easeOutElastic", "loop" : "no", "parameter" : "x", "t0" : -200, "t1" : 250 }
] },
{ "type" : "Label", "x" : 230, "y" : 100, "text" : "Animation" },
{ "type" : "Button", "x" : 180, "y" : 740, "text" : "Okay", "actions" : { "onMouseClicked" : [ "pop" ] } }
]
},
"character_edit" :
{
"stage" : "editor",
"background" : [
{ "type" : "Label", "x" : 255, "y" : 10, "text" : "Editor" },
{ "type" : "Frame", "x" : 6, "y" : 80, "w" : 308, "h" : 330, "text" : "Preview" },
{ "type" : "Frame", "x" : 324, "y" : 80, "w" : 308, "h" : 330, "text" : "Layer" },
{ "type" : "Frame", "x" : 6, "y" : 450, "w" : 308, "h" : 330, "text" : "Color" },
{ "type" : "Frame", "x" : 324, "y" : 450, "w" : 308, "h" : 330, "text" : "Editor" }
],
"views" : [
{ "view" : "RotatingModelPreview", "x" : 18, "y" : 112, "w" : 340, "h" : 427 },
{ "view" : "ModelEditView", "x" : 385, "y" : 112, "w" : 340, "h" : 427 }
],
"controls" : [
{ "type" : "Slider", "x" : 590, "y" : 105, "h" : 270, "binding" : "EDIT_LAYER" },
{ "type" : "HSlider", "x" : 330, "y" : 390, "w" : 270, "binding" : "EDIT_ROTATION" },
{ "type" : "ToolButton", "x" : 330, "y" : 455, "icon" : 23 },
{ "type" : "ToolButton", "x" : 380, "y" : 455, "icon" : 23 },
{ "type" : "ToolButton", "x" : 10, "y" : 800, "icon" : 20, "actions" : { "onMouseClicked" : [ "push:settings" ] } },
{ "type" : "ToolButton", "x" : 300, "y" : 800, "icon" : 22, "actions" : { "onMouseClicked" : [ "push:welcome" ] } },
{ "type" : "ToolButton", "x" : 580, "y" : 800, "icon" : 13, "actions" : { "onMouseClicked" : [ "push:menu" ] } },
{ "type" : "Button", "x" : 180, "y" : 800, "text" : "Okay", "actions" : { "onMouseClicked" : [ "pop" ] } }
]
},
"game_wait" :
{
"stage" : "game",
"controls" : [
{ "type" : "Label", "x" : 255, "y" : 10, "text" : "Blocky" },
{ "type" : "Label", "x" : 255, "y" : 40, "text" : "Froggy" },
{ "type" : "Label", "x" : 10, "y" : 10, "text" : "Score" },
{ "type" : "Label", "x" : 10, "y" : 40, "text" : "${SCORE}" },
{ "type" : "Label", "x" : 630, "y" : 10, "align" : 1, "text" : "Highest" },
{ "type" : "Label", "x" : 630, "y" : 40, "align" : 1, "text" : "${HIGH_SCORE}" },
{ "type" : "Button", "x" : 180, "y" : 740, "text" : "Start", "actions" : { "onMouseClicked" : [ "goto:game" ] } },
{ "type" : "ToolButton", "x" : 10, "y" : 800, "icon" : 20, "actions" : { "onMouseClicked" : [ "push:settings" ] } },
{ "type" : "ToolButton", "x" : 300, "y" : 800, "icon" : 22, "actions" : { "onMouseClicked" : [ "push:welcome" ] } },
{ "type" : "ToolButton", "x" : 580, "y" : 850, "icon" : 22, "actions" : { "onMouseClicked" : [ "push:menu" ] } }
]
},
"game_old" :
{
"stage" : "game",
"controls" : [
{ "type" : "Label", "x" : 255, "y" : 10, "text" : "Blocky" },
{ "type" : "Label", "x" : 255, "y" : 40, "text" : "Froggy" },
{ "type" : "Label", "x" : 10, "y" : 10, "text" : "Score" },
{ "type" : "Label", "x" : 10, "y" : 40, "text" : "${SCORE}" },
{ "type" : "Label", "x" : 630, "y" : 10, "align" : 1, "text" : "Highest" },
{ "type" : "Label", "x" : 630, "y" : 40, "align" : 1, "text" : "${HIGH_SCORE}" },
{ "type" : "ToolButton", "x" : 10, "y" : 800, "icon" : 20, "actions" : { "onMouseClicked" : [ "push:settings" ] } },
{ "type" : "ToolButton", "x" : 300, "y" : 800, "icon" : 22, "actions" : { "onMouseClicked" : [ "push:welcome" ] } },
{ "type" : "ToolButton", "x" : 580, "y" : 800, "icon" : 13, "actions" : { "onMouseClicked" : [ "push:menu" ] } }
],
"actions" : { "onExit" : [ "goto:game_over" ] }
},
"game" :
{
"stage" : "game",
"controls" : [
{ "type" : "Label", "x" : 255, "y" : 10, "text" : "Blocky" },
{ "type" : "Label", "x" : 255, "y" : 40, "text" : "Froggy" },
{ "type" : "Label", "x" : 10, "y" : 10, "text" : "Score" },
{ "type" : "Label", "x" : 10, "y" : 40, "text" : "${SCORE}" },
{ "type" : "Label", "x" : 630, "y" : 10, "align" : 1, "text" : "Highest" },
{ "type" : "Label", "x" : 630, "y" : 40, "align" : 1, "text" : "${HIGH_SCORE}" },
{ "type" : "ToolButton", "x" : 580, "y" : 850, "icon" : 22, "actions" : { "onMouseClicked" : [ "push:menu" ] } }
],
"actions" : { "onExit" : [ "goto:game_over" ] }
},
"menu" :
{
"stage" : "game",
"controls" : [
{ "type" : "Label", "x" : 255, "y" : 10, "text" : "Menu" },
{ "type" : "Button", "x" : 200, "y" : 100, "text" : "AR Demo", "actions" : { "onMouseClicked" : [ "push:motd" ] } },
{ "type" : "Button", "x" : 200, "y" : 170, "text" : "Carosel", "actions" : { "onMouseClicked" : [ "push:character_select" ] } },
{ "type" : "Button", "x" : 200, "y" : 240, "text" : "Editor", "actions" : { "onMouseClicked" : [ "push:character_edit" ] } },
{ "type" : "Button", "x" : 200, "y" : 310, "text" : "Welcome", "actions" : { "onMouseClicked" : [ "push:welcome" ] } },
{ "type" : "Button", "x" : 200, "y" : 380, "text" : "Lua Test", "actions" : { "onMouseClicked" : [ "push:lua_test" ] } },
{ "type" : "Button", "x" : 200, "y" : 450, "text" : "Animation", "actions" : { "onMouseClicked" : [ "push:animation" ] } },
{ "type" : "Button", "x" : 200, "y" : 520, "text" : "Game", "actions" : { "onMouseClicked" : [ "push:game" ] } },
{ "type" : "Button", "x" : 200, "y" : 590, "text" : "Settings", "actions" : { "onMouseClicked" : [ "push:settings" ] } },
{ "type" : "Button", "x" : 200, "y" : 660, "text" : "Debug", "actions" : { "onMouseClicked" : [ "push:cheats" ] } },
{ "type" : "Button", "x" : 200, "y" : 800, "text" : "Close", "actions" : { "onMouseClicked" : [ "pop" ] } }
]
},
"settings" :
{
"stage" : "game",
"controls" : [
{ "type" : "Label", "x" : 245, "y" : 10, "text" : "Settings" },
{ "type" : "CheckBox", "x" : 80, "y" : 100, "text" : "Enable Shadows ${ENABLE_SHADOWS}", "binding" : "ENABLE_SHADOWS" },
{ "type" : "CheckBox", "x" : 80, "y" : 150, "text" : "Enable Shadow Attenuation ${ENABLE_SHADOW_ATTN}", "binding" : "ENABLE_SHADOW_ATTN" },
{ "type" : "CheckBox", "x" : 80, "y" : 200, "text" : "Enable Distance Fog ${ENABLE_DISTANCE_FOG}", "binding" : "ENABLE_DISTANCE_FOG" },
{ "type" : "CheckBox", "x" : 80, "y" : 250, "text" : "Enable Ramp Shading ${ENABLE_RAMP_SHADING}", "binding" : "ENABLE_RAMP_SHADING" },
{ "type" : "CheckBox", "x" : 80, "y" : 300, "text" : "Enable Darkened Sides ${ENABLE_DARKENED_SIDES}", "binding" : "ENABLE_DARKENED_SIDES" },
{ "type" : "CheckBox", "x" : 80, "y" : 350, "text" : "Enable Textures ${ENABLE_TEXTURES}", "binding" : "ENABLE_TEXTURES" },
{ "type" : "CheckBox", "x" : 80, "y" : 400, "text" : "Enable Bevels ${ENABLE_BEVELS}", "binding" : "ENABLE_BEVELS" },
{ "type" : "CheckBox", "x" : 80, "y" : 450, "text" : "Enable Lighting ${ENABLE_LIGHTING}", "binding" : "ENABLE_LIGHTING" },
{ "type" : "ToolButton", "x" : 10, "y" : 100, "icon" : 13 },
{ "type" : "Button", "x" : 380, "y" : 800, "text" : "Back", "actions" : { "onMouseClicked" : [ "pop" ] } }
]
},
"cheats" :
{
"stage" : "game",
"controls" : [
{ "type" : "Label", "x" : 225, "y" : 10, "text" : "Cheats/Debug" },
{ "type" : "CheckBox", "x" : 80, "y" : 100, "text" : "Show FPS ${DEBUG_FPS}", "binding" : "DEBUG_FPS" },
{ "type" : "CheckBox", "x" : 80, "y" : 150, "text" : "Debugging ${DEBUG}", "binding" : "DEBUG" },
{ "type" : "CheckBox", "x" : 80, "y" : 200, "text" : "Debugging camera ${DEBUG_CAMERA}", "binding" : "DEBUG_CAMERA" },
{ "type" : "CheckBox", "x" : 80, "y" : 250, "text" : "Debugging collisions ${DEBUG_COLLISIONS}", "binding" : "DEBUG_COLLISIONS" },
{ "type" : "CheckBox", "x" : 80, "y" : 300, "text" : "Model editing ${MODEL_EDITING}", "binding" : "MODEL_EDITING" },
{ "type" : "CheckBox", "x" : 80, "y" : 350, "text" : "Visualize Triangles ${DEBUG_TRIANGLES}", "binding" : "DEBUG_TRIANGLES" },
{ "type" : "Button", "x" : 380, "y" : 800, "text" : "Back", "actions" : { "onMouseClicked" : [ "pop" ] } }
]
},
"game_over" :
{
"stage" : "game",
"controls" : [
{ "type" : "Panel", "x" : 230, "y" : 100, "w" : 640, "h" : 1024 },
{ "type" : "Label", "x" : 210, "y" : 130, "text" : "Game Over" },
{ "type" : "ToolButton", "x" : 10, "y" : 800, "icon" : 20, "actions" : { "onMouseClicked" : [ "push:settings" ] } },
{ "type" : "Button", "x" : 190, "y" : 560, "text" : "Play", "actions" : { "onMouseClicked" : [ "goto:game" ] } },
{ "type" : "ToolButton", "x" : 580, "y" : 850, "icon" : 22, "actions" : { "onMouseClicked" : [ "push:menu" ] } }
]
},
"game_over_old" :
{
"stage" : "game",
"controls" : [
{ "type" : "Panel", "x" : 230, "y" : 100, "w" : 640, "h" : 1024 },
{ "type" : "Label", "x" : 210, "y" : 130, "text" : "Game Over" },
{ "type" : "Rectangle", "x" : 65, "y" : 260, "w" : 500, "h" : 50, "r" : 0, "g" : 0, "b" : 255, "a" : 255, "animations" : [
{ "timeScale" :1400, "curve" : "easeOut", "loop" : "no", "parameter" : "x", "t0" : -800, "t1" : 65 },
{ "timeScale" :1400, "curve" : "easeOut", "loop" : "no", "parameter" : "y", "t0" : 200, "t1" : 260 },
{ "timeScale" :1400, "curve" : "easeOut", "loop" : "no", "parameter" : "a", "t0" : 0, "t1" : 255 }
] },
{ "type" : "Label", "x" : 220, "y" : 270, "text" : "Free Gift" },
{ "type" : "Rectangle", "x" : 65, "y" : 330, "w" : 500, "h" : 50, "r" : 255, "g" : 0, "b" : 0, "a" : 255, "animations" : [
{ "timeScale" :1400, "curve" : "square", "loop" : "no", "parameter" : "g", "t0" : 255, "t1" : 0 }
]
},
{ "type" : "Label", "x" : 180, "y" : 340, "text" : "Win a Present" },
{ "type" : "Button", "x" : 190, "y" : 560, "text" : "Play", "actions" : { "onMouseClicked" : [ "goto:character_edit" ] } }
]
}
}
}