Пример #1
0
        public void SetAchievementIDCollection(params IDContainer[] _idCollection)
        {
            int _count = _idCollection.Length;

            AchievementMetadata[] _metadataCollection = new AchievementMetadata[_count];

            for (int _iter = 0; _iter < _count; _iter++)
            {
                _metadataCollection[_iter] = AchievementMetadata.Create(_idCollection[_iter]);
            }

            SetAchievementMetadataCollection(_metadataCollection);
        }
Пример #2
0
        private void Initialise()
        {
            // Initialise product settings
            m_assetStoreProduct = new AssetStoreProduct(kProductName, kProductVersion, Constants.kLogoPath);

            // Initialise Game Services settings
#if USES_GAME_SERVICES
            if (m_gameServicesSettings.AchievementMetadataCollection == null)
            {
                IDContainer[]         _achievementIDCollection = m_gameServicesSettings.AchievementIDCollection;
                int                   _count = _achievementIDCollection.Length;
                AchievementMetadata[] _metadataCollection = new AchievementMetadata[_count];

                for (int _iter = 0; _iter < _count; _iter++)
                {
                    _metadataCollection[_iter] = AchievementMetadata.Create(_achievementIDCollection[_iter]);
                }

                m_gameServicesSettings.AchievementMetadataCollection = _metadataCollection;
            }

            if (m_gameServicesSettings.LeaderboardMetadataCollection == null)
            {
                IDContainer[]         _leaderboardIDCollection = m_gameServicesSettings.LeaderboardIDCollection;
                int                   _count = _leaderboardIDCollection.Length;
                LeaderboardMetadata[] _metadataCollection = new LeaderboardMetadata[_count];

                for (int _iter = 0; _iter < _count; _iter++)
                {
                    _metadataCollection[_iter] = LeaderboardMetadata.Create(_leaderboardIDCollection[_iter]);
                }

                m_gameServicesSettings.LeaderboardMetadataCollection = _metadataCollection;
            }
#endif
        }