示例#1
0
	protected virtual void SetItemInSlot( UIInvenSlot _slot, RealItem _realItem )
	{
		if( null == _slot )
			return;
		
		if( null == _realItem )
			return;
		
		_slot.DeleteSlotItem();
		_slot.CreateSlotItem( _realItem, _slot.transform );
		_slot.ResetSlotItemLocalPosition(-0.5f);
		ItemMgr.HadItemManagement.Inven.SetSlotMoveLock( _realItem.getSlot, true );
		if( AsHudDlgMgr.Instance.IsOpenInven )
		{
			AsHudDlgMgr.Instance.invenDlg.ApplySlotMoveLock();
		}
	}
示例#2
0
	protected void SetResultSlot( int _index, UIInvenSlot _slot )
	{
		if( 0 == _index || -1 == _index )
		{
			_slot.DeleteSlotItem();
			return;
		}
		
		RealItem _realItem = ItemMgr.HadItemManagement.Inven.GetRealItemInSlot( _index );
		if( null == _realItem )
		{
			Debug.LogError("AsDisassembleDlg::SetResultSlot()[null == _realItem] id " + _index );
			return;
		}		
		
		_slot.DeleteSlotItem();
		_slot.CreateSlotItem( _realItem, _slot.transform );		
		_slot.ResetSlotItemLocalPosition(-0.5f);
	}