// Use this for initialization void Start() { fullcollider.SetActive(false); menudemo.SetActive(false); checklogin = false; ProgressPuzzle = PuzzleP.GetComponent <PuzzleProgress> (); mystats.puzzles = ProgressPuzzle; sp = new ServiceAPI("cc5e4b986d3d998ac24752f4796db9da71b4ca958a405d4da416a5e254762284", "4ff997d23e3d2ae89e207a1899f0be8b3df96da3ec0118f64d7fe1859d0a6078"); App42API.Initialize("cc5e4b986d3d998ac24752f4796db9da71b4ca958a405d4da416a5e254762284", "4ff997d23e3d2ae89e207a1899f0be8b3df96da3ec0118f64d7fe1859d0a6078"); #if UNITY_ANDROID StartAppWrapper.init(); StartAppWrapper.addBanner( StartAppWrapper.BannerType.AUTOMATIC, StartAppWrapper.BannerPosition.BOTTOM); #endif #if UNITY_IPHONE StartAppWrapperiOS.unityOrientation(StartAppWrapperiOS.STAUnityOrientation.STALandscape); StartAppWrapperiOS.addBanner(StartAppWrapperiOS.BannerPosition.BOTTOM); StartAppWrapperiOS.disableReturnAd(); #endif /* * advertisement = banner.GetComponent<AdMobPlugin> (); * advertisement.verticalPosition = AdVerticalPosition.TOP; * advertisement.Reconfigure (); */ }
public UserSetup() { App42API.Initialize(Constants.API_KEY, Constants.SECRET_KEY); InitializeComponent(); userService = App42API.BuildUserService(); }
// Use this for initialization static void initiate() { App42API.Initialize(apiKey, secretKey); userService = App42API.BuildUserService(); callback = new CallBack(); ; }
// Use this for initialization void Start() { goRank = false; ranks = new List <Text>(); names = new List <Text>(); score = new List <Text>(); texts = new List <GameObject>(); reload = relo; scorenew = false; otherMetaHeaders.Add("orderByDescending", "score"); App42API.Initialize(key, secretkey); App42Log.SetDebug(true); gameserv = App42API.BuildGameService(); scoreboardserv = App42API.BuildScoreBoardService(); scoreboardserv.SetOtherMetaHeaders(otherMetaHeaders); scoreboardserv.GetTopNRankers(gamename, maxplayers, new toprankMenu()); if (texts.Count < 20) { for (int i = 0; i < 20; i++) { texts.Add(GameObject.Find("Text" + (i + 1))); } for (int i = 0; i < texts.Count; i++) { ranks.Add(texts [i].transform.FindChild("ran").GetComponent <Text> ()); names.Add(texts [i].transform.FindChild("nome").GetComponent <Text> ()); score.Add(texts [i].transform.FindChild("pt").GetComponent <Text> ()); } //Debug.Log ("veioaquiDENOVO"); } render = GameObject.Find("hsImg").GetComponent <Image> (); error [0] = bla [0]; error [1] = bla [1]; }
void Start() { App42API.Initialize("d7c45a342781ca01c76b67ae107ef645816d0cae6ff2a12cecbb310fd4f94261", "c75984ec945c84d924f97577d6a07cf12d375f433117734de67d1cc43fd91604"); rank = userRank; rank2 = userRank2; rank3 = userRank3; }
public transition2() { InitializeComponent(); App42API.Initialize(Constants.API_KEY, Constants.SECRET_KEY); userService.GetUser(Global.localUsername, this); flag = true; }
public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs args) { // A consumable product has been purchased by this user. if (String.Equals(args.purchasedProduct.definition.id, GameConfig.Instance.kProductID50, StringComparison.Ordinal)) { GameManager.Instance.gold += 50; AppsFlyerAnalytic.Instance.Purchaser(GameConfig.Instance.kProductID50, "Gold 50", "0.99", "USD", System.DateTime.Now.Date.ToString()); //if (PlayerPrefs.GetInt("Gold", 10) > 50 && Mathf.Abs(PlayerPrefs.GetInt("GoldPre", 0) - PlayerPrefs.GetInt("Gold", 10)) >= 50) //{ PlayerPrefs.SetInt("GoldPre", (int)GameManager.Instance.gold); StorageService storageService = App42API.BuildStorageService(); storageService.UpdateDocumentByKeyValue("Db", "Data", "id", GameConfig.id, JsonUtility.ToJson(new SaveGold(GameConfig.id, (int)GameManager.Instance.gold)), new UnityCallBack2()); //} UIManager.Instance.PushGiveGold("You have recived 50 gold "); PlayerPrefs.SetInt("NoBanner", 1); Ads.Instance.HideBanner(); } // Or ... a non-consumable product has been purchased by this user. else if (String.Equals(args.purchasedProduct.definition.id, GameConfig.Instance.kProductID300, StringComparison.Ordinal)) { GameManager.Instance.gold += 300; AppsFlyerAnalytic.Instance.Purchaser(GameConfig.Instance.kProductID300, "Gold 300", "3.99", "USD", System.DateTime.Now.Date.ToString()); PlayerPrefs.SetInt("GoldPre", (int)GameManager.Instance.gold); StorageService storageService = App42API.BuildStorageService(); storageService.UpdateDocumentByKeyValue("Db", "Data", "id", GameConfig.id, JsonUtility.ToJson(new SaveGold(GameConfig.id, (int)GameManager.Instance.gold)), new UnityCallBack2()); UIManager.Instance.PushGiveGold("You have recived 300 gold "); PlayerPrefs.SetInt("NoAds", 1); PlayerPrefs.SetInt("NoBanner", 1); Ads.Instance.HideBanner(); } // Or ... a subscription product has been purchased by this user. else if (String.Equals(args.purchasedProduct.definition.id, GameConfig.Instance.kProductID5000, StringComparison.Ordinal)) { GameManager.Instance.gold += 5000; AppsFlyerAnalytic.Instance.Purchaser(GameConfig.Instance.kProductID5000, "Gold 5000", "39.99", "USD", System.DateTime.Now.Date.ToString()); PlayerPrefs.SetInt("GoldPre", (int)GameManager.Instance.gold); StorageService storageService = App42API.BuildStorageService(); storageService.UpdateDocumentByKeyValue("Db", "Data", "id", GameConfig.id, JsonUtility.ToJson(new SaveGold(GameConfig.id, (int)GameManager.Instance.gold)), new UnityCallBack2()); UIManager.Instance.PushGiveGold("You have recived 5000 gold "); PlayerPrefs.SetInt("NoAds", 1); PlayerPrefs.SetInt("NoBanner", 1); Ads.Instance.HideBanner(); } // Or ... an unknown product has been purchased by this user. Fill in additional products here.... else { //Mng.mng.ui.loading.SetActive(false); UIManager.Instance.PushGiveGold("Oops!!! Something went wrong. Please try again later"); Debug.Log(string.Format("ProcessPurchase: FAIL. Unrecognized product: '{0}'", args.purchasedProduct.definition.id)); } if (UIManager.Instance.panelLoadingIAP != null) { UIManager.Instance.panelLoadingIAP.SetActive(false); } // Return a flag indicating whether this product has completely been received, or if the application needs // to be reminded of this purchase at next app launch. Use PurchaseProcessingResult.Pending when still // saving purchased products to the cloud, and when that save is delayed. return(PurchaseProcessingResult.Complete); }
public static void CreateNewUserOnRegistration(string userName, string pwd, string emailId) { UserService user = App42API.BuildUserService(); user.CreateUser(userName, pwd, emailId, new UnityCallBack()); // Debug.Log ("Create new user on Registration of Push Services"); }
public void setScore(double userScore) { App42API.Initialize("47675efb1d62deab9e46b9d43795e45c381c341bec9033abb9622fa1a88e5720", "256e86ad5fe1038aaf20334d51c894f1dfa9839996dbaa2e92376141761a07f0"); ScoreBoardService scoreBoardService = App42API.BuildScoreBoardService(); scoreBoardService.EditScoreValueById(scoreID, userScore, new UnityCallBack()); }
public void getScore() { App42API.Initialize("47675efb1d62deab9e46b9d43795e45c381c341bec9033abb9622fa1a88e5720", "256e86ad5fe1038aaf20334d51c894f1dfa9839996dbaa2e92376141761a07f0"); ScoreBoardService scoreBoardService = App42API.BuildScoreBoardService(); scoreBoardService.GetScoresByUser(gameName, TestUser._testUser.UserName, new UnityCallBack()); }
public void acceptFriendRequest() { App42API.Initialize("47675efb1d62deab9e46b9d43795e45c381c341bec9033abb9622fa1a88e5720", "256e86ad5fe1038aaf20334d51c894f1dfa9839996dbaa2e92376141761a07f0"); BuddyService buddyService = App42API.BuildBuddyService(); buddyService.AcceptFriendRequest(TestUser._testUser.UserName, buddyName.text, new UnityCallBack()); }
// Use this for initialization void Start() { App42Log.SetDebug(true); //Prints output in your editor console // App42API.Initialize("API_KEY", "SECRET_KEY"); albumService = App42API.BuildAlbumService(); // albumService.GetAlbums(userName, new UnityCallBack()); }
// Use this for initialization void Start() { // App42API.Initialize("0f8d9be1cad28cf2dd9b67c33555635f29f26992723be154a70e49083a68f952", "960640b896bf9ff26c6abbd7c854fc0dfc08ef65f56e98f5d7227015e662957b"); albumService = App42API.BuildAlbumService(); photoService = App42API.BuildPhotoService(); Common.galleryManager = this; }
void GetAllUser() { DeleteChilds(); App42API.Initialize("47675efb1d62deab9e46b9d43795e45c381c341bec9033abb9622fa1a88e5720", "256e86ad5fe1038aaf20334d51c894f1dfa9839996dbaa2e92376141761a07f0"); UserService userService = App42API.BuildUserService(); userService.GetAllUsers(new UnityCallBack()); }
public void GetLeaderBoard(int count, App42CallBack callback) { if (scoreBoardService == null) { scoreBoardService = App42API.BuildScoreBoardService(); } scoreBoardService.GetTopNRankers(GAME_NAME, count, callback); }
void GetFriends() { DeleteChilds(); App42API.Initialize("47675efb1d62deab9e46b9d43795e45c381c341bec9033abb9622fa1a88e5720", "256e86ad5fe1038aaf20334d51c894f1dfa9839996dbaa2e92376141761a07f0"); BuddyService buddyService = App42API.BuildBuddyService(); buddyService.GetAllFriends(TestUser._testUser.UserName, new UnityCallBack()); }
void GetLeaderboardUsers() { DeleteChilds(); App42API.Initialize("47675efb1d62deab9e46b9d43795e45c381c341bec9033abb9622fa1a88e5720", "256e86ad5fe1038aaf20334d51c894f1dfa9839996dbaa2e92376141761a07f0"); ScoreBoardService scoreBoardService = App42API.BuildScoreBoardService(); scoreBoardService.GetTopRankings(gameName, new UnityCallBack()); }
//Pre: N/A //Post: OnlineStorage class is initialized //Description: This method initializes the online storage class. public static void Initialize() { App42API.Initialize(KEY_API, KEY_SECRET); ServiceAPI api = new ServiceAPI(KEY_API, KEY_SECRET); uploadService = api.BuildUploadService(); }
public void registerPlayer() { userUsername = uName.text; userEmail = eMail.text; userPass = password.text; userPassConfirm = passConfirm.text; //clearAll(); if (userUsername != "" && userUsername.Length < 10) { if (userEmail != "") { if (userPass != "" && userPassConfirm != "") { if (userPass == userPassConfirm) { if (ValidateEmail(userEmail) == true) { App42API.Initialize("47675efb1d62deab9e46b9d43795e45c381c341bec9033abb9622fa1a88e5720", "256e86ad5fe1038aaf20334d51c894f1dfa9839996dbaa2e92376141761a07f0"); UserService userService = App42API.BuildUserService(); ScoreBoardService scoreBoardService = App42API.BuildScoreBoardService(); scoreBoardService.SaveUserScore(gameName, userUsername, gameScore, new UnityCallBack()); userService.CreateUser(userUsername, userPass, userEmail, new UnityCallBack()); passwordCheck.text = ""; } else { clearLabels(); eMailCheck.text = "Invalid Email"; } } else { clearLabels(); passwordCheck.text = "Password do not match"; } } else { clearLabels(); passwordCheck.text = "Enter password"; } } else { clearLabels(); eMailCheck.text = "Enter your email"; } } else { clearLabels(); uNameCheck.text = "Enter username"; } }
// Use this for initialization void Awake() { Common.app42 = this; // App42API.Initialize("0f8d9be1cad28cf2dd9b67c33555635f29f26992723be154a70e49083a68f952", "960640b896bf9ff26c6abbd7c854fc0dfc08ef65f56e98f5d7227015e662957b"); InitializeApp42(); UserService userService = App42API.BuildUserService(); // userService.CreateUser(userName, pwd, emailId, new UnityCallBack()); }
public static void ConnectWithFacebook() { socialService = App42API.BuildSocialService(); // Making facebook Permissions Array. string[] perms = new string[10]; perms [0] = FBPerms.email; perms [1] = FBPerms.user_friends; socialService.DoFBOAuthAndGetToken(AppConstants.FB_APP_ID, perms, false, new LeaderBoardCallBack()); }
// Use this for initialization void Start() { DontDestroyOnLoad(this); App42Log.SetDebug(true); App42API.Initialize(api_key, secret_key); // Debug.Log ("Start called -----" + this.gameObject.name); // #if !UNITY_EDITOR setListenerGameObject(this.gameObject.name); // sets the name of the game object as a listener to which this script is assigned. // #endif }
void Start() { #if UNITY_EDITOR ServicePointManager.ServerCertificateValidationCallback = Validator; #endif App42API.Initialize(AppConstants.API_KEY, AppConstants.SECRET_KEY); App42API.EnableCrashEventHandler(false); App42Log.SetDebug(true); App42API.SetDbName(AppConstants.DB_NAME); }
public void RestoreProgess() { //loading.SetActive(true); StorageService storageService = App42API.BuildStorageService(); storageService.FindDocumentByKeyValue("Db", "Data", "id", GameConfig.id, new UnityCallBack3()); UIManager.Instance.panelSetting.SetActive(false); UIManager.Instance.PushGiveGold("Waiting ..."); }
public void onDeviceToken(String deviceToken) { message = "Device token from native: " + deviceToken; String deviceType = App42Push.getDeviceType(); if (deviceType != null && deviceToken != null && deviceToken.Length != 0) { App42API.BuildPushNotificationService().StoreDeviceToken(App42API.GetLoggedInUser(), deviceToken, deviceType, new Callback()); } }
// Update is called once per frame void Update() { if (createUser) { createUser = false; UserService userService = App42API.BuildUserService(); userService.CreateUser(userName, "passwordboka", userName + "@gmail.com", new UnityCallBackCreateUser()); } if (saveScore) { saveScore = false; if (PlayerPrefs.HasKey("user") && PlayerPrefs.HasKey("score")) { ScoreBoardService scoreBoardService = App42API.BuildScoreBoardService(); scoreBoardService.SaveUserScore("mordenSenta", PlayerPrefs.GetString("user"), PlayerPrefs.GetInt("score"), new UnityCallBackSaveScore()); } } if (getUserRank) { Debug.Log("user klicem"); getUserRank = false; if (PlayerPrefs.HasKey("user")) { ScoreBoardService scoreBoardService = App42API.BuildScoreBoardService(); scoreBoardService.GetUserRanking("mordenSenta", PlayerPrefs.GetString("user"), new UnityCallBackGetUserRank()); Debug.Log("user klicem"); } } if (getTopNRanks) { getTopNRanks = false; ScoreBoardService scoreBoardService = App42API.BuildScoreBoardService(); scoreBoardService.GetTopNRankers("mordenSenta", 10, new UnityCallBackGetTopRanks()); } if (recivedUser != null) { saveScore = true; PlayerPrefs.SetString("user", userName); recivedUser = null; signIn.SetActive(false); //leaderTabela.SetActive(true); menuSkripta.userVpisan = true; } if (recivedScore != null) { recivedScore = null; getUserRank = true; } }
public static void GlobalLeaderBoard() { errorMessage = false; LeaderBoardCallBack.fList.Clear(); FriendsLeaderBoardCallBack.friendList.Clear(); LeaderBoardCallBack.fromLeaderBoard = true; scoreBoardService = App42API.BuildScoreBoardService(); Query q = QueryBuilder.Build("userId", "", Operator.LIKE); scoreBoardService.SetQuery(AppConstants.collectionName, q); scoreBoardService.GetTopNRankers(AppConstants.gameName, 10, new LeaderBoardCallBack()); }
public void callRequests() { UsersButtonScript buttonScript = sendRequest.GetComponent <UsersButtonScript>(); buddyName = buttonScript.nameLabel.text; App42API.Initialize("47675efb1d62deab9e46b9d43795e45c381c341bec9033abb9622fa1a88e5720", "256e86ad5fe1038aaf20334d51c894f1dfa9839996dbaa2e92376141761a07f0"); BuddyService buddyService = App42API.BuildBuddyService(); buddyService.SendFriendRequest(TestUser._testUser.UserName, buddyName, message, new UnityCallBack()); }
void Start() { m_ScreenRectangle = new Rect(0, 0, Screen.width, 100); m_GUIStyle = new GUIStyle { fontSize = 16, alignment = TextAnchor.MiddleCenter, wordWrap = true }; #if UNITY_WP8 App42API.Initialize(Constants.ApiKey, Constants.SecretKey); message = "Push Channel Start"; #endif }
public void Start() { DontDestroyOnLoad(transform.gameObject); App42API.Initialize(ApiKey, SecretKey); App42API.SetLoggedInUser(UserId); //Put Your Game Object Here App42Push.setApp42PushListener(this); #if UNITY_ANDROID App42Push.registerForPush(GoogleProjectNo); message = App42Push.getLastPushMessage(); #endif }