public override void OnAfterDuped(ItemSocket oldSocket) { if (oldSocket is EnchantedHotItemSocket) { Container = ((EnchantedHotItemSocket)oldSocket).Container; } }
public override void OnAfterDuped(ItemSocket oldSocket) { if (oldSocket is SlayerSocket) { Slayer = ((SlayerSocket)oldSocket).Slayer; } }
public void AddItemSocketInSlot(Character character) { if (slotsInventoryLists.Count >= 1) { int index = slotsInventoryLists.FindIndex(e => e.transform.childCount == 0); ItemSocket newItemSocket = Instantiate(ItemSocketDummy, slotsInventoryLists[index].transform); newItemSocket.AddInstance(character); Debug.Log("Add item[" + character.name + "] in slot: " + index); } }
void Update() { if (transform.childCount == 1) { ItemSocketInSlot = transform.GetChild(0).GetComponent <ItemSocket>(); } else { ItemSocketInSlot = null; } }
void Start() { if (transform.childCount == 1) { ItemSocketInSlot = transform.GetChild(0).GetComponent <ItemSocket>(); } else if (transform.childCount > 1) { Debug.LogError("[Inventory Slot] ItemSocket over in 1 slot."); } }
public override void OnAfterDuped(ItemSocket oldSocket) { if (oldSocket is HonestyItemSocket honesty) { HonestyRegion = honesty.HonestyRegion; HonestyOwner = honesty.HonestyOwner; HonestyPickup = honesty.HonestyPickup; HonestyTimerTicking = honesty.HonestyTimerTicking; if (HonestyTimerTicking) { BeginTimer(); } } }
private string SocketStr(ItemSocket s) { switch (s.Attr) { case 'D': return("<font color=\"#d8ff42\">●</font>"); case 'S': return("<font color=\"#ea2c4a\">●</font>"); case 'I': return("<font color=\"#8888ff\">●</font>"); default: return(""); } }