Esempio n. 1
0
        public PlayerDataHelper(SpilUnityImplementationBase Instance)
        {
            string walletString    = Instance.GetWalletFromSdk();
            string inventoryString = Instance.GetInvetoryFromSdk();

            if (walletString != null && inventoryString != null)
            {
                WalletData    walletData    = JsonHelper.getObjectFromJson <WalletData>(walletString);
                InventoryData inventoryData = JsonHelper.getObjectFromJson <InventoryData>(inventoryString);

                AddDataToHelper(walletData != null ? walletData.currencies : null, inventoryData != null ? inventoryData.items : null);
            }
        }
        public PlayerDataHelper(SpilUnityImplementationBase Instance)
        {
            string walletString = Instance.GetWalletFromSdk ();
            string inventoryString = Instance.GetInvetoryFromSdk ();
            if (walletString != null && inventoryString != null) {
                WalletData walletData = JsonHelper.getObjectFromJson<WalletData> (walletString);
                InventoryData inventoryData = JsonHelper.getObjectFromJson<InventoryData> (inventoryString);

                AddDataToHelper (walletData != null ? walletData.currencies : null, inventoryData != null ? inventoryData.items : null);
            }
        }