Ejemplo n.º 1
0
        public static void VerifyItemBinary()
        {
            var  data   = Properties.Resources.itempacket;
            bool result = PocketInjector.ValidateItemBinary(data);

            result.Should().BeTrue();
        }
Ejemplo n.º 2
0
    private void Start()
    {
        //IL_00b4: Unknown result type (might be due to invalid IL or missing references)
        //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
        //IL_00f8: Unknown result type (might be due to invalid IL or missing references)
        //IL_0102: Expected O, but got Unknown
        sbc = new SysBotController(InjectionType.Pouch);
        UISB.AssignSysbot(sbc);
#if PLATFORM_ANDROID
        usbac = new USBBotAndroidController();
        UISB.AssignUSBBotAndroid(usbac);
#endif
#if UNITY_STANDALONE || UNITY_EDITOR
        usbc = new USBBotController();
        UISB.AssignUSBBot(usbc);
#endif
        for (int i = 0; i < MAXITEMS; i++)
        {
            Items.Add(new Item(Item.NONE));
        }

        uiitems = new List<UI_ACItem>(GetComponentsInChildren<UI_ACItem>());
        List<UI_ACItem> list = new List<UI_ACItem>();
        int num = 0;
        foreach (UI_ACItem uiitem in uiitems)
        {
            GameObject obj = Instantiate(PrefabItem.gameObject);
            obj.transform.SetParent(transform);
            obj.transform.position = uiitem.transform.position;
            obj.transform.localScale = uiitem.transform.localScale;
            UI_ACItem component = obj.GetComponent<UI_ACItem>();
            int currentIndex = num;
            component.ButtonComponent.onClick.AddListener(delegate
            {
                SetSelection(currentIndex);
            });
            list.Add(component);
            uiitem.gameObject.SetActive(false);
            num++;
        }
        uiitems = list;

        PrefabItem.gameObject.SetActive(false);
        set(Items.ToArray());

        PocketInjector inj = new PocketInjector(Items, sbc.Bot);
        injector = new AutoInjector(inj, AfterRead, AfterWrite);
#if PLATFORM_ANDROID
        PocketInjector usbaInj = new PocketInjector(Items, usbac.Bot);
        usbaInjector = new AutoInjector(usbaInj, AfterRead, AfterWrite);
#endif
#if UNITY_STANDALONE || UNITY_EDITOR
        PocketInjector usbInj = new PocketInjector(Items, usbc.Bot);
        usbInjector = new AutoInjector(usbInj, AfterRead, AfterWrite);
#endif

        SetSelection(0);
        LastInstanceOfItemGrid = this;
    }