private void OnChange_SlotData(InventorySlot.OnChangeSlotData_Msg sMsg) { if (bIsDebug) { Debug.Log($"{name}-{nameof(OnChange_SlotData)} Slot : {sMsg.pSlot.name}", this); } // 밑에 코드때문에 무한루프돔; //if (sMsg.pData_Prev != null) // Slot_ClearData(sMsg.pSlot, sMsg.pData_Prev.IInventoryData_Key); //if (sMsg.bSlot_IsEmpty) // Slot_ClearData(sMsg.pSlot, true); //else // Slot_Set_NewData(sMsg.pSlot, sMsg.pData_Current, true); }
/* protected - [abstract & virtual] */ // ========================================================================== // #region Private private void OnChangeSlotData(InventorySlot.OnChangeSlotData_Msg obj) { if (bIsDebug) { Debug.Log($"{name}-{obj.pSlot.iSlotIndex} {nameof(OnChangeSlotData)} - Slot is Empty : {obj.pSlot.pData == null}", this); } if (obj.pData_Current == null) { pImage_Icon.sprite = null; pImage_Icon.color = new Color(0f, 0f, 0f, 0f); _pText_Name.text = ""; } else { InventoryExample.SomthingData pData = obj.pData_Current as InventoryExample.SomthingData; pImage_Icon.sprite = pData.pSpriteIcon; pImage_Icon.color = pData.pColor; _pText_Name.text = pData.strName; } }