protected override void OnDragDropRelease(GameObject surface)
{
base.OnDragDropRelease(surface);
if(surface != null){
if(surface .tag ==Tags .Inventory_Item_grid){
if(surface ==this.transform .parent .gameObject){
}else{
InventoryItemGrid oldParent = this.transform.parent.GetComponent();
this.transform.parent = surface.transform;ResetPosition();
InventoryItemGrid newParent = surface.GetComponent();
newParent.SetId(oldParent.id ,oldParent .num );
oldParent.CleaRInfo();
}
}else if(surface . tag==Tags .Inventory_Item ){
InventoryItemGrid grid1 = this.transform.parent.GetComponent();
InventoryItemGrid grid2 = surface.transform.parent . GetComponent();
int id = grid1.id;
int num = grid2.num;
grid1.SetId(grid2.id, grid2.num);
grid2.SetId(id,num);
}
}
ResetPosition ();
}