// Start is called before the first frame update void Start() { InitializePlayGames(); GoogleLogin(); //filePath = Application.persistentDataPath + "/" + "LastProgress.png"; //screenShotCamScript = ScreenshotCamera.GetComponent<Screenshot>(); //tex = new Texture2D(Screen.width, Screen.height, TextureFormat.RGBA32, false); //ScoreAddText = Resources.Load( "ScoreAddText" ) as GameObject; // authenticate user: //if (File.Exists( filePath ser //{ // var fileData = File.ReadAllBytes( filePath ); // tex = new Texture2D( 2, 2 ); // tex.LoadImage( fileData ); //..this will auto-resize the texture dimensions. // //Texture2D. // MainmenuBGMat.mainTexture = tex; // MainMenuBG.texture = tex; //} //else //{ // MainMenuBG.enabled = false; //} isSoundOn = PlayerPrefs.GetInt("Sound", 1) == 1 ? true : false; SoundManagerScript.SetSound(isSoundOn); SetSoundIcons(); adCounter = PlayerPrefs.GetInt("adCounter", 0); purchasedNoAds = SaveGame.Load <int>("Ads", 0, true); if (purchasedNoAds == 1) { AdPurchased(); } var privacy = PlayerPrefs.GetInt("Privacy", 0); if (privacy == 0) { ShowPrivacyPolicyWindow(); } }
public void ToggleSound() { isSoundOn = !isSoundOn; SetSoundIcons(); SoundManagerScript.SetSound(isSoundOn); }