Ejemplo n.º 1
0
    public static void Set(Transform icon, Transform material_info, REWARD_TYPE reward_type, uint id, string section_name, Transform parentScroll)
    {
        //IL_0028: Unknown result type (might be due to invalid IL or missing references)
        //IL_0035: Unknown result type (might be due to invalid IL or missing references)
        //IL_003a: Expected O, but got Unknown
        UIButton componentInChildren = icon.GetComponentInChildren <UIButton>();

        if (!(componentInChildren == null))
        {
            MaterialInfoButton materialInfoButton = icon.GetComponent <MaterialInfoButton>();
            if (materialInfoButton == null)
            {
                materialInfoButton = icon.get_gameObject().AddComponent <MaterialInfoButton>();
            }
            materialInfoButton.parentButton = componentInChildren.get_transform();
            materialInfoButton.itemName     = Utility.GetRewardName(reward_type, id);
            materialInfoButton.parentScroll = parentScroll;
            MaterialInfo component = material_info.GetComponent <MaterialInfo>();
            component.Initialize(section_name);
            materialInfoButton.materialInfo = component;
        }
    }