コード例 #1
0
 private static void Postfix(ItemData item, GameObject __result)
 {
     try
     {
         var spriteRenderer = __result.GetComponentInChildren <SpriteRenderer>();
         ItemColorUtil.ModifyColor(spriteRenderer, item);
     }
     catch (Exception e)
     {
         Log.ExceptionOnce(e);
     }
 }
コード例 #2
0
 private static void Postfix(int ItemIndex, ItemData __instance)
 {
     try
     {
         var gameObject = GameObject.Find("GlobalUI/Bag/ItemBar/QuickButton (" + ItemIndex + ")");
         var bagItem    = gameObject.GetComponent <BagItem>();
         ItemColorUtil.ModifyColor(bagItem.selfImage.GetComponent <Image>(), __instance);
     }
     catch (Exception e)
     {
         Log.ExceptionOnce(e);
     }
 }
コード例 #3
0
 private static void Prefix(ItemData weaponItemData, Character __instance)
 {
     try
     {
         if (weaponItemData == null || weaponItemData.IsWeapon() == false)
         {
             return;
         }
         var spriteRenderer = __instance.Weapon.GetComponentInChildren <SpriteRenderer>();
         ItemColorUtil.ModifyColor(spriteRenderer, weaponItemData);
     }
     catch (Exception e)
     {
         Log.ExceptionOnce(e);
     }
 }
コード例 #4
0
        private static void Postfix(ItemData item, BaseBagItem __instance, int targetIndex)
        {
            try
            {
                if (item == null)
                {
                    return;
                }

                ItemColorUtil.ModifyColor(__instance.selfImage.GetComponent <Image>(), item);
            }
            catch (Exception e)
            {
                Log.ExceptionOnce(e);
            }
        }