Esempio n. 1
0
		public void AddSlotData(SlotData slotData)
		{
			if(slotData == null)
			{
				throw new ArgumentException();
			}
			
			if (_slotDataList.IndexOf(slotData) < 0)
			{

				_slotDataList.Add(slotData);

			}
			else
			{
				throw new ArgumentException();
			}
		}
		private static SlotData parseSlotData(Dictionary<String, Object> slotObject, SkeletonData data)
		{
			SlotData slotData = new SlotData();
			slotData.Name = slotObject[ConstValues.A_NAME] as String;
			slotData.Parent = slotObject[ConstValues.A_PARENT] as String;
			slotData.ZOrder = (float)slotObject[ConstValues.A_Z_ORDER];

			if (slotObject.ContainsKey (ConstValues.A_BLENDMODE)) {
			  
			  if (slotObject [ConstValues.A_BLENDMODE] == null) 
			  {
				slotData.BlendMode = "normal";
			  }
			  else
			  {
				slotData.BlendMode = slotObject [ConstValues.A_BLENDMODE].ToString();
			  }
			}
			foreach(Dictionary<String, Object> displayObject in slotObject[ConstValues.DISPLAY] as List<object>)
			{
				slotData.AddDisplayData(parseDisplayData(displayObject as Dictionary<string, object>, data));
			}
			
			return slotData;
		}