Power_up_doc_handle = -1
local Power_up_anim_h = -1
local Is_paused = -1
function power_up_init()
vint_dataitem_add_subscription("game_paused_item", "update", "power_up_game_is_paused") --to check if game is paused..
Power_up_doc_handle = vint_document_find("power_up")
Power_up_anim_h = vint_object_find("power_up_anim", 0, Power_up_doc_handle)
vint_apply_start_values(Power_up_anim_h)
local twn_h = Vdo_tween_object:new("end_event_twn", Power_up_anim_h)
twn_h:set_end_event("power_up_exit")
if Is_paused == false then
lua_play_anim(Power_up_anim_h)
end
end
function power_up_exit()
vint_document_unload(Power_up_doc_handle)
end
function power_up_on()
lua_play_anim(Power_up_anim_h)
end
function power_up_game_is_paused(di_h)
Is_paused = vint_dataitem_get(di_h)
if Is_paused == true then
vint_set_property(Power_up_anim_h, "is_paused", true)
else
vint_set_property(Power_up_anim_h, "is_paused", false)
end
end
function power_up_cleanup()
end