Esempio n. 1
0
        public void Awake()
        {
            Instance = this;

            uGUI_Equipment uGUIequipment = gameObject.GetComponent <uGUI_Equipment>();

            Dictionary <string, uGUI_EquipmentSlot> ALLSLOTS = (Dictionary <string, uGUI_EquipmentSlot>)uGUIequipment.GetPrivateField("allSlots");

            foreach (KeyValuePair <string, uGUI_EquipmentSlot> item in ALLSLOTS)
            {
                if (SlotHelper.ALLSLOTS.TryGetValue(item.Key, out SlotData slotData))
                {
                    Text text = AddTextToSlot(item.Value.transform, slotData);

                    ALLSLOTS_Text.Add(slotData.SlotID, text);
                }
            }
        }
Esempio n. 2
0
        internal static void Postfix(ref uGUI_Equipment __instance)
        {
            var allSlots = (Dictionary <string, uGUI_EquipmentSlot>)__instance.GetPrivateField("allSlots", BindingFlags.SetField);

            Initialize_uGUI.Instance.Add_uGUIslots(__instance, allSlots);
        }
Esempio n. 3
0
        public void Awake()
        {
            Instance = this;

            ALLSLOTS_Text.Clear();

            uGUI_Equipment uGUIequipment = gameObject.GetComponent <uGUI_Equipment>();

            Dictionary <string, uGUI_EquipmentSlot> ALLSLOTS = (Dictionary <string, uGUI_EquipmentSlot>)uGUIequipment.GetPrivateField("allSlots");

            BZLogger.Debug("uGUI_SlotTextHandler processing ALLSLOTS...");

            foreach (KeyValuePair <string, uGUI_EquipmentSlot> item in ALLSLOTS)
            {
                BZLogger.Debug($"slot name: {item.Key}");

                if (SlotHelper.ALLSLOTS.TryGetValue(item.Key, out SlotData slotData))
                {
                    TextMeshProUGUI TMProText = AddTextToSlot(item.Value.transform, slotData);

                    ALLSLOTS_Text.Add(slotData.SlotID, TMProText);
                }
            }

            BZLogger.Log("uGUI_SlotTextHandler added.");
        }