예제 #1
0
    void Awake()
    {
        _groups = new List <IGroup>();

        _itemsController = FindObjectOfType <ItemsController>();
        _itemsTabControl = FindObjectOfType <ItemsTabControl>();
    }
예제 #2
0
    void Start()
    {
        _groupsController = FindObjectOfType <GroupsController>();
        _itemsController  = FindObjectOfType <ItemsController>();
        _extraController  = FindObjectOfType <ExtraController>();
        _itemsTabControl  = FindObjectOfType <ItemsTabControl>();

        CartModel = new CartModel();

        ItemIcons = new Dictionary <string, Sprite>();

        if (FindObjectOfType <XsollaLogin>() != null)
        {
            print("Store demo starts. Use token obtained from Login: "******"Store demo starts. Use default hardcoded token: " + DefaultStoreToken);
            XsollaStore.Instance.Token = DefaultStoreToken;
        }

        XsollaStore.Instance.CreateNewCart(XsollaSettings.StoreProjectId, newCart => { Cart = newCart; }, ShowError);

        XsollaStore.Instance.GetListOfItems(XsollaSettings.StoreProjectId, InitStoreUi, ShowError);

        RefreshInventory();
    }
예제 #3
0
    protected virtual void Start()
    {
        _groupsController = FindObjectOfType <GroupsController>();
        _itemsController  = FindObjectOfType <ItemsController>();
        _itemsTabControl  = FindObjectOfType <ItemsTabControl>();

        ApplyStoreImplementation(GetImplementation());
        CatalogInit();
    }