pollfish.isLoaded()

类型 函数
返回值 布尔值
修订版本 版本 2024.3703
关键词 广告, Pollfish, isLoaded
另请参阅 pollfish.show()
pollfish.*

概述

检查是否已加载调查问卷并准备好显示。

语法

pollfish.isLoaded()

示例

local pollfish = require( "plugin.pollfish" )

local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        pollfish.load()
    end
end

-- Initialize the Pollfish plugin
pollfish.init( adListener, { apiKey="YOUR_API_KEY" } )

-- Sometime later, check if a survey is loaded
local isSurveyLoaded = pollfish.isLoaded()
print( isSurveyLoaded )