一些修复和优化
This commit is contained in:
@@ -68,6 +68,25 @@ public class equipItemPrefab : MonoBehaviour, IBeginDragHandler, IDragHandler, I
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
if (spawnedDescription != null)
|
||||
{
|
||||
Destroy(spawnedDescription);
|
||||
spawnedDescription = null;
|
||||
}
|
||||
|
||||
if (dragGhost != null)
|
||||
{
|
||||
Destroy(dragGhost);
|
||||
dragGhost = null;
|
||||
dragGhostRect = null;
|
||||
}
|
||||
|
||||
suppressNextClick = false;
|
||||
isDraggingWithLeftButton = false;
|
||||
}
|
||||
|
||||
public void Bind(equipmentSO so, Action<equipmentSO> onClick = null, Func<equipmentSO, bool> onRightClick = null)
|
||||
{
|
||||
itemSO = so;
|
||||
|
||||
Reference in New Issue
Block a user