Esempio n. 1
0
    private void ClearBench(int i_TeamIndex)
    {
        if (!IsValidIndex(i_TeamIndex))
        {
            return;
        }

        SlotList slotList = m_Bench[i_TeamIndex];

        for (int index = 0; index < slotList.Count; ++index)
        {
            tnUICharacterSlot slot = slotList[index];
            if (slot != null)
            {
                tnUICharacter character = slot.character;
                RecycleCharacter(character);

                slot.Clear();
            }

            RecycleCharacterSlot(slot);
        }

        slotList.Clear();
    }
Esempio n. 2
0
    private void RecycleCharacterSlot(tnUICharacterSlot i_Slot)
    {
        if (i_Slot == null)
        {
            return;
        }

        i_Slot.Clear();

        i_Slot.gameObject.SetActive(false);
        m_CharactersSlotsPool.Add(i_Slot);
    }