Ejemplo n.º 1
0
	public void Open( byte _iIndex, ProductionProgData _progData )
	{
		SetSlot(_iIndex);
		
		if( null != textShowLevel )
			textShowLevel.Text = string.Empty;
			
		
		Tbl_Production_Record record = AsTableManager.Instance.GetProductionTable().GetRecord( _progData.getServerData.nRecipeIndex );
		if( null == record )
		{
			Debug.LogError("ProductionProgItemIng::Open()[ recipe index : " + _progData.getServerData.nRecipeIndex );
			return;
		}
		
		m_item = ItemMgr.ItemManagement.GetItem( record.getItemID );
		if( null == m_item )
		{
			Debug.LogError("ProductionProgItemIng::Open()[ item index : " + record.getItemID );
			return;
		}
		
		textItemName.Text = AsTableManager.Instance.GetTbl_String( m_item.ItemData.nameId );
		
		if( null != m_SlotItem )
		{
			GameObject.DestroyObject( m_SlotItem.gameObject );
		}
		
		if( false == record.IsRandItemType() )
		{
			m_SlotItem = ResourceLoad.CreateItemIcon( m_item.GetIcon(), iconImgPos, Vector3.back, minusItemSize );
			GameObject.DestroyImmediate( m_SlotItem.coolTime.gameObject);
			GameObject.DestroyImmediate( m_SlotItem.itemCountText.gameObject);
			m_SlotItem.iconImg.renderer.enabled = false;
			
			
			UIListItem _listitem = gameObject.GetComponent<UIListItem>();
			if( null != m_SlotItem && null != _listitem )
			{
				_listitem.layers[0] = m_SlotItem.iconImg;
			}
		}
		else
		{
			if( null != textShowLevel )
				textShowLevel.Text = string.Format( AsTableManager.Instance.GetTbl_String(901), m_item.ItemData.levelLimit );
		}
		m_ProgData = _progData;	
		
		
		
		m_cashSphere = GetCashCost();
		textCashCost.Text = m_cashSphere.ToString();
	}
Ejemplo n.º 2
0
	public void InsertItemComplete( byte _iIndex, ProductionProgData _progData )
	{
		UIListItem item = progresslList.CreateItem( goResProgItemComplete ) as UIListItem;		
		ProductionProgItemComplete _progressItem  = item.gameObject.GetComponent<ProductionProgItemComplete>();	
		_progressItem.Open( _iIndex, _progData );			
	}