Пример #1
0
        // Writes a single entry to a leaderboard
        //
        // "extraData" is a 2KB custom data field that is associated to the leaderboard entry
        // This can be a game replay or anything that give more detail about the entry to the viewer
        //
        // Set "forceUpdate" to true will have the score always update
        // even if it's not the user's personal best score that is being submitted
        public static Request WriteEntry(string leaderboardName, long score, byte[] extraData = null, bool forceUpdate = false)
        {
            if (Core.IsInitialized())
            {
                return(new Request(CAPI.ovr_Leaderboard_WriteEntry(
                                       leaderboardName,
                                       score,
                                       extraData,
                                       (extraData != null) ? (uint)extraData.Length : 0,
                                       forceUpdate
                                       )));
            }

            return(null);
        }