public void Rate() { #if UNITY_ANDROID Application.OpenURL("market://details?id=com.KinglyStudios.SimpleVectors"); #endif GUIManagement.LoadGUISetupSingular("Title"); }
public void Awake() { if (PlayerBoxController.currentPlayer.playerSuggestedNameAlready) { GUIManagement.LoadGUISetupSingular("CantSubmitAnotherName"); } }
public void Update() { inTime += Time.deltaTime; blockRenderer.color = Color.Lerp(blockRenderer.color, new Color32(64, 64, 64, 255), 0.5f); if (!deathFlakes.gameObject.activeSelf) { deathFlakes.gameObject.SetActive(true); if (!playedSound) { SoundManager.PlaySoundEffect("Explode"); playedSound = true; } } else if (inTime > 0.5f && !deathFlakes.isStopped) { deathFlakes.Stop(); PlayerBoxController.instance.DestructTrail(); } blockRenderer.gameObject.transform.localScale *= Mathf.Clamp(1.4f - inTime, 0, 1); if (1.35f < inTime) { GUIManagement.LoadGUISetupSingular("Death"); enabled = false; } }
public void Awake() { Debug.Log(SystemInfo.deviceUniqueIdentifier); instance = this; GUIManagement.LoadGUISetupSingular("Title"); SoundManager.soundEffectSource = GetComponent <AudioSource>(); SoundManager.musicSource = SoundManager.soundEffectSource; if (PlayerPrefs.HasKey("HighScore")) { highestScore = PlayerPrefs.GetInt("HighScore"); } if (currentPlayer == null) { if (PlayerPrefs.HasKey("Customization")) { currentPlayer = SerializationManagement.XMLToObject <PlayerCustomizationSettings>(PlayerPrefs.GetString("Customization")); } else { currentPlayer = new PlayerCustomizationSettings(); } currentPlayer.numberOfTimesOpened += 1; if (currentPlayer.numberOfTimesOpened == 4) { GUIManagement.LoadGUISetupSingular("RateMe"); } } if (currentPlayer.activeColor == Color.clear) { currentPlayer.activeColor = new Color32(0, 255, 0, 255); } DrawPlayerCube(); Leaderboard.Initialize(); }
public void ApplyTouchPhysic(RaycastHit2D hit) { if (GUIManagement.openWindows.Count == 0 || IsPointerOverUIObject() || !(GUIManagement.openWindows[0] is TitleScreen || GUIManagement.openWindows[0] is InGameScreen)) { return; } if (!playing) { playing = true; currentScore = 0; distanceAwayFromLavaBonus = 0; GUIManagement.LoadGUISetupSingular("InGame"); } lookCalculatorCenterTransform.LookAt(hit.point); Vector3 motionToAdd = lookCalculatorCenterTransform.position - lookCalculatorOutsideTransform.position; playerCube.velocity = motionToAdd * 5; if (playerCube.angularVelocity > 2.5f) { playerCube.angularVelocity = Mathf.Clamp(playerCube.angularVelocity * 1.25f, -60, 60); } else { playerCube.angularVelocity = Random.Range(-30, 30); } }
public void OnAdRewarded(object sender, Reward args) { PlayerBoxController.currentPlayer.timeUntilNextAd = DateTime.Now.AddMinutes(60); PlayerBoxController.currentPlayer.goldCoins += 50; PlayerBoxController.currentPlayer.silverCoins += 5; GUIManagement.LoadGUISetupSingular("VideoRewarded"); OnVideoUnload(null, null); }
public void Suggest(InputField suggestion) { bool trueE = SendString("parchment.play001.net", 25563, SystemInfo.deviceUniqueIdentifier + ";" + suggestion.text); if (trueE) { GUIManagement.LoadGUISetupSingular("NameSubmitted"); PlayerBoxController.currentPlayer.playerSuggestedNameAlready = true; } else { GUIManagement.LoadGUISetupSingular("NameSubmissionFailure"); } }
public void Start() { if (!PlayerBoxController.currentPlayer.playerSuggestedNameAlready && SystemInfo.deviceUniqueIdentifier == "aafc27d674ed92d3de90e0434bac2972") { GUIManagement.LoadGUISetupSingular("WonNamingPrize"); PlayerBoxController.currentPlayer.silverCoins += 400; PlayerBoxController.currentPlayer.playerSuggestedNameAlready = true; } if (loadShopOnStart) { GUIManagement.LoadGUISetupSingular("ShopPremium"); loadShopOnStart = false; return; } highScoreText.text = "High Score: " + PlayerBoxController.highestScore; goldCoinText.text = "x " + PlayerBoxController.currentPlayer.goldCoins; silverCoinText.text = "x " + PlayerBoxController.currentPlayer.silverCoins; rewardedAdvertisementButton.onClick.AddListener(() => { AdvertisementManager.instance.ShowRewardedVideo(); }); if (Leaderboard.currentUserStatus == Leaderboard.UserAuthenticationStatus.Authenticated) { Social.ReportScore(PlayerBoxController.highestScore, GooglePlayIDs.leaderboard_high_scores, succ => { Debug.Log("Posting user's highest score successful: " + succ); }); } }
public void LoadGUISetupSingular(string setup) { GUIManagement.LoadGUISetupSingular(setup); }