Gis_grain_doc_handle = -1
local Grain_anim_h = -1
local Is_paused = -1
function gis_grain_init()
vint_dataitem_add_subscription("game_paused_item", "update", "gis_grain_game_is_paused") --to check if game is paused..
Gis_grain_doc_handle = vint_document_find("gis_grain")
Grain_anim_h = vint_object_find("grain_anim")
local twn_h = vint_object_find("end_event_twn", Grain_anim_h)
vint_set_property(twn_h, "end_event", "vint_anim_loop_callback")
vint_apply_start_values(Grain_anim_h)
if Is_paused == false then
lua_play_anim(Grain_anim_h)
end
end
function gis_grain_game_is_paused(di_h)
Is_paused = vint_dataitem_get(di_h)
if Is_paused == true then
vint_set_property(Grain_anim_h, "is_paused", true)
else vint_set_property(Grain_anim_h, "is_paused", false)
end
end
function gis_grain_cleanup()
end