From 2c6df5c1ace6cee7151cdfcedff8bc6fbde53a22 Mon Sep 17 00:00:00 2001 From: Artsiom Trubchyk Date: Wed, 31 Jan 2024 00:16:08 +0300 Subject: [PATCH] Update example --- example/main.script | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/example/main.script b/example/main.script index 57460d8..784dc17 100644 --- a/example/main.script +++ b/example/main.script @@ -31,8 +31,10 @@ function init(self) -- If `mraid` is available, the game is ran in the webview of Unity Ads or other mraid-based ad system. if mraid then mraid.set_listener(mraid_callback) + toggle_music(self, mraid.is_viewable()) + else + toggle_music(self, true) end - toggle_music(self, mraid and mraid.is_viewable() or true) go.set("/music", "euler.z", 20) go.animate("/music", "euler.z", go.PLAYBACK_LOOP_PINGPONG, -20, go.EASING_INCUBIC, 0.7)