public void GetDescriptionImage(EditorAchievementDescription _description)
        {
            EGCAchievementDescription _curDescription = GetAchievementDescription(_description.Identifier);
            IDictionary _dataDict = new Dictionary <string, object>();

            if (_curDescription == null)
            {
                _dataDict[kErrorKey] = Constants.kGameServicesIdentifierInfoNotFoundError;
            }
            else if (_curDescription.Image == null)
            {
                _dataDict[kErrorKey] = "Image not found.";
            }
            else
            {
                _dataDict[kImageKey] = _curDescription.Image;
            }

            // Send event
            if (NPBinding.GameServices != null)
            {
                NPBinding.GameServices.InvokeMethod(kRequestForAchievementImageFinishedEvent, new object[] {
                    _description.GetInstanceID(),
                    _dataDict
                }, new Type[] {
                    typeof(string),
                    typeof(IDictionary)
                });
            }
        }
		public static EditorAchievementDescription[] ConvertAchievementDescriptionsList (IList _gcDescriptions)
		{
			if (_gcDescriptions == null)
				return null;
			
			int 				_count				= _gcDescriptions.Count;
			EditorAchievementDescription[]	_descriptionsList	= new EditorAchievementDescription[_count];
			
			for (int _iter = 0; _iter < _count; _iter++)
				_descriptionsList[_iter]			= new EditorAchievementDescription((EGCAchievementDescription)_gcDescriptions[_iter]);
			
			return _descriptionsList;
		}
Example #3
0
            public static EditorAchievementDescription[] ConvertToEditorAchievementDescriptionList(EGCAchievementDescription[] _gcAchievementDescriptionList)
            {
                if (_gcAchievementDescriptionList == null)
                {
                    return(null);
                }

                int _count = _gcAchievementDescriptionList.Length;

                EditorAchievementDescription[] _newDescriptionList = new EditorAchievementDescription[_count];

                for (int _iter = 0; _iter < _count; _iter++)
                {
                    _newDescriptionList[_iter] = _gcAchievementDescriptionList[_iter].GetEditorFormatData();
                }

                return(_newDescriptionList);
            }
        public static EditorAchievementDescription[] ConvertAchievementDescriptionsList(IList _gcDescriptions)
        {
            if (_gcDescriptions == null)
            {
                return(null);
            }

            int _count = _gcDescriptions.Count;

            EditorAchievementDescription[] _descriptionsList = new EditorAchievementDescription[_count];

            for (int _iter = 0; _iter < _count; _iter++)
            {
                _descriptionsList[_iter] = new EditorAchievementDescription((EGCAchievementDescription)_gcDescriptions[_iter]);
            }

            return(_descriptionsList);
        }