object.hidden(对象.隐藏)

类型 布尔值
修订 版本 2024.3703
关键词 steam, steamworks, 成就, AchievementInfo, 隐藏
另请参阅 AchievementInfo(成就信息)
steamworks.*

概述

一个 布尔值,指示该成就是否设置为在锁定时隐藏。

通常情况下,您不会显示有关锁定的隐藏成就的信息,尤其是在它们的名称和描述可能会剧透游戏结局的情况下。

示例

local steamworks = require( "plugin.steamworks" )

local achievementInfo = steamworks.getAchievementInfo( "achievementName" )

if ( achievementInfo ) then
    if ( achievementInfo.hidden and ( achievementInfo.unlocked == false ) ) then
        -- This is a hidden achievement that hasn't been unlocked yet
        -- We should not display information about it
    end
end