Tweak title splash
- Move position up - Add common COLLISION_ENABLED handling to prevent splash from showing when reloading a save with the scenario card on the table
This commit is contained in:
parent
7a2d025f37
commit
bcc6dc5b8d
@ -11,12 +11,15 @@ local ENCOUNTER_DISCARD_AREA = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local currentScenario
|
local currentScenario
|
||||||
|
-- we use this to turn off collision handling until onLoad() is complete
|
||||||
|
local COLLISION_ENABLED = false
|
||||||
|
|
||||||
function onLoad(saveState)
|
function onLoad(saveState)
|
||||||
if saveState ~= nil then
|
if saveState ~= nil then
|
||||||
local loadedState = JSON.decode(saveState) or { }
|
local loadedState = JSON.decode(saveState) or { }
|
||||||
currentScenario = loadedState.currentScenario
|
currentScenario = loadedState.currentScenario
|
||||||
end
|
end
|
||||||
|
COLLISION_ENABLED = true
|
||||||
end
|
end
|
||||||
|
|
||||||
function onSave()
|
function onSave()
|
||||||
@ -27,6 +30,9 @@ end
|
|||||||
|
|
||||||
-- TTS event handler. Handles scenario name event triggering and encounter card token resets.
|
-- TTS event handler. Handles scenario name event triggering and encounter card token resets.
|
||||||
function onCollisionEnter(collisionInfo)
|
function onCollisionEnter(collisionInfo)
|
||||||
|
if not COLLISION_ENABLED then
|
||||||
|
return
|
||||||
|
end
|
||||||
local object = collisionInfo.collision_object
|
local object = collisionInfo.collision_object
|
||||||
if object.getName() == "Scenario" then
|
if object.getName() == "Scenario" then
|
||||||
if currentScenario ~= object.getDescription() then
|
if currentScenario ~= object.getDescription() then
|
||||||
|
@ -101,6 +101,7 @@
|
|||||||
<Panel
|
<Panel
|
||||||
id="title_splash"
|
id="title_splash"
|
||||||
height="220"
|
height="220"
|
||||||
|
position="0 250 0"
|
||||||
showAnimation="FadeIn"
|
showAnimation="FadeIn"
|
||||||
hideAnimation="FadeOut"
|
hideAnimation="FadeOut"
|
||||||
active="false"
|
active="false"
|
||||||
|
Loading…
Reference in New Issue
Block a user