Esempio n. 1
0
 public override void OnAfterDuped(ItemSocket oldSocket)
 {
     if (oldSocket is EnchantedHotItemSocket)
     {
         Container = ((EnchantedHotItemSocket)oldSocket).Container;
     }
 }
Esempio n. 2
0
 public override void OnAfterDuped(ItemSocket oldSocket)
 {
     if (oldSocket is SlayerSocket)
     {
         Slayer = ((SlayerSocket)oldSocket).Slayer;
     }
 }
Esempio n. 3
0
    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);
        }
    }
Esempio n. 4
0
 void Update()
 {
     if (transform.childCount == 1)
     {
         ItemSocketInSlot = transform.GetChild(0).GetComponent <ItemSocket>();
     }
     else
     {
         ItemSocketInSlot = null;
     }
 }
Esempio n. 5
0
 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.");
     }
 }
Esempio n. 6
0
        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();
                }
            }
        }
Esempio n. 7
0
        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("");
            }
        }