Ejemplo n.º 1
0
            public static void Postfix(ShopItemDefinition item, ref BaseShopHud.NotificationIcon notification)
            {
                try
                {
                    if (notification != BaseShopHud.NotificationIcon.None || !(item is HarvestItemDefinition) ||
                        !needed((HarvestItemDefinition)item))
                    {
                        return;
                    }

                    notification = (BaseShopHud.NotificationIcon) 3;
                }
                catch (Exception e)
                {
                    logger.Error("get failed " + e);
                }
            }
Ejemplo n.º 2
0
            public static void Postfix(GameObject buttonInstance,
                                       BaseShopHud.NotificationIcon notification = BaseShopHud.NotificationIcon.None)
            {
                try
                {
                    if ((int)notification != 3)
                    {
                        return;
                    }

                    var btn = buttonInstance.GetComponentInChildWithSuffix <Image>("IconNew", false);
                    btn.sprite = SpriteLibrary.GetSprite("Star");
                }
                catch (Exception e)
                {
                    logger.Error("setup failed " + e);
                }
            }