public SocialPurchasingStore(SocialAPIManager socialApiManager) { // _localizationService = localizationService; // _server = server; _socialAPIManager = socialApiManager; _products = new List <ProductDescription>(); }
void Awake() { NetworkImage.AddToCahe("noAvatar", _noAvatarSprite); UsersManager = new UsersManager(); Current = this; SocialAPIManager = new SocialAPIManager(_socialAPIJSBridge); SocialAPIManager.Initialize(); SocialAPIManager.UserProfileLoaded += (x) => OnPlayerDataLoaded(x); SocialAPIManager.UserProfileLoadingFailed += (x) => Debug.Log("UserProfileLoadingFailed"); SocialAPIManager.LoadUserProfile(); SocialAPIManager.UserFriendsLoading += OnUserFriendsLoaded; SocialAPIManager.UserFriendsLoadingFailed += OnUserFriendsLoaded; SocialAPIManager.LoadUserFriends(); SocialAPIManager.ProductPurchased += OnProductPurchased; SocialAPIManager.ProductPurchaseFailed += OnProductPurchasedFail; ServerRequests.GetAllUsers(GetAllUsersCallBack, () => Debug.Log("GetAllUsersError")); }