public static int Main() { return(QuestCheck.Check(7) ? TRUE : FALSE); }
// Use this for initialization void Start() { PlayerPrefs.EnableEncryption(true); GameData.isMusicON = PlayerPrefs.GetBool(Constants.KEY_SOUND, true); GameData.isNotifcationON = PlayerPrefs.GetBool(Constants.KEY_NOTIFICATIONS, true); MainDriver.Instance.currentDiamondCnt = PlayerPrefs.GetInt(Constants.KEY_CURRENT_DIAMONDS, 0); MainDriver.Instance.lifeTimeDiamondCnt = PlayerPrefs.GetInt(Constants.KEY_LIFETIME_DIAMONDS, 0); MainDriver.Instance.gameCount = PlayerPrefs.GetInt(Constants.KEY_GAME_COUNT, 0); MainDriver.Instance.puzzleSolved = PlayerPrefs.GetInt(Constants.KEY_PUZZLE_SOLVED, 0); MainDriver.Instance.unlockedThemeCnt = PlayerPrefs.GetInt(Constants.UNLOCKED_THEMES_COUNT, 0); MainDriver.Instance.dailyChallangeCnt = PlayerPrefs.GetInt(Constants.DAILY_CHALLENGE_COUNT, 0); MainDriver.Instance.diamondPuzzleCnt = PlayerPrefs.GetInt(Constants.PUZZLE_WITH_DIAMONDS, 0); MainDriver.Instance.puzzleIn115Cnt = PlayerPrefs.GetInt(Constants.PUZZLE_UNDER_115, 0); MainDriver.Instance.puzzleIn130Cnt = PlayerPrefs.GetInt(Constants.PUZZLE_UNDER_130, 0); MainDriver.Instance.puzzleIn145Cnt = PlayerPrefs.GetInt(Constants.PUZZLE_UNDER_145, 0); MainDriver.Instance.ccPuzzle245Cnt = PlayerPrefs.GetInt(Constants.PUZZLE_CONSECUTIVE_245, 0); MainDriver.Instance.ccPuzzle300Cnt = PlayerPrefs.GetInt(Constants.PUZZLE_CONSECUTIVE_300, 0); audioSource = transform.GetComponent <AudioSource>(); questChecker = transform.GetComponent <QuestCheck>(); Instance.shallShowVideo = true; unlockedThemes = new List <int>(); for (int themeId = 1; themeId <= Constants.TOTAL_THEMES; themeId++) { if (themeId <= Constants.FREE_THEMES) { unlockedThemes.Add(themeId); } else { string keyForThemeLock = Utility.KeyForThemeLock(themeId); bool isThemeLocked = PlayerPrefs.GetBool(keyForThemeLock, true); if (!isThemeLocked) { unlockedThemes.Add(themeId); } } } #if UNITY_ANDROID #if !AMAZON PlayGamesPlatform.Activate(); #endif EtceteraAndroid.cancelNotification(Constants.H4); EtceteraAndroid.cancelNotification(Constants.H8); EtceteraAndroid.cancelNotification(Constants.D1); EtceteraAndroid.cancelNotification(Constants.D3); EtceteraAndroid.cancelNotification(Constants.D7); EtceteraAndroid.cancelNotification(Constants.D14); EtceteraAndroid.cancelNotification(Constants.D30); EtceteraAndroid.cancelAllNotifications(); #elif UNITY_IOS GameCenterPlatform.ShowDefaultAchievementCompletionBanner(true); UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge); UnityEngine.iOS.NotificationServices.ClearLocalNotifications(); UnityEngine.iOS.NotificationServices.CancelAllLocalNotifications(); // clear badge number UnityEngine.iOS.LocalNotification temp = new UnityEngine.iOS.LocalNotification(); temp.fireDate = DateTime.Now; temp.applicationIconBadgeNumber = -1; temp.alertBody = ""; UnityEngine.iOS.NotificationServices.ScheduleLocalNotification(temp); #endif //Read all puzzle data Reader dataReader = Reader.Instance; //Facebook Initialize FB.Init(this.OnInitComplete, this.OnHideUnity); HeyzapAds.Start("790edd987b2facf1eb7117dfc97d354b", HeyzapAds.FLAG_NO_OPTIONS); #if AMAZON InitializeGameCircle(); #else SignIn(); #endif Invoke("Play", splashHoldTime); DontDestroyOnLoad(gameObject); }
public static int Main() { return(QuestCheck.Check(3) ? 1 : 0); }
// Use this for initialization void Start() { // Application.targetFrameRate = 60; //Get all data PlayerPrefs.EnableEncryption(true); Instance.isNoAdsPurchased = PlayerPrefs.GetBool(Constants.KEY_NOADS, false); GameData.currentBirdId = PlayerPrefs.GetInt(Constants.KEY_BIRD_ID, 0); Instance.bestScore = PlayerPrefs.GetInt(Constants.KEY_BEST, 0); Instance.totalEggs = PlayerPrefs.GetInt(Constants.KEY_TOTAL_EGGS, 0); Instance.isFirstTimeUser = PlayerPrefs.GetBool(Constants.KEY_FIRST_TIME, true); GameData.isTutorial = PlayerPrefs.GetBool(Constants.KEY_TUTORIAL, true); Instance.gameCount = PlayerPrefs.GetInt(Constants.KEY_TOTAL_GAMES, 0); Instance.totalScoreOfSession = 0; Instance.sessionGameCount = 0; Instance.audioSource = transform.GetComponent <AudioSource>(); GameData.isMusic = PlayerPrefs.GetBool(Constants.KEY_MUSIC, true); // Debug.Log("MAIN START"); { Invoke("PlayGame", splashHoldTime); // Invoke("SignIn", 2.0f); } #if UNITY_ANDROID PlayGamesPlatform.Activate(); EtceteraAndroid.cancelNotification(Constants.H4); // EtceteraAndroid.cancelNotification( Constants.H8 ); EtceteraAndroid.cancelNotification(Constants.D1); EtceteraAndroid.cancelNotification(Constants.D3); EtceteraAndroid.cancelNotification(Constants.D7); EtceteraAndroid.cancelNotification(Constants.D14); EtceteraAndroid.cancelNotification(Constants.D30); // var key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn+MGqVUOeZYeOpAHzh+2fjA/SFHsZtMRfsn+jPf24VyPpj3stWeHMVCQY6lC18khZZdycuXHdtGp5enS/qdw02QoIhJUOZNSP8EXOpHxqfL4MaQ4G2AEgYxXV/Au2WXrfQ8cfC8xuE+n/MmER9b3dBHMRyIYeoafacqcrHdjmhLJy+vSL05NpJcURVTaRjAlwUL3PWa2ViJMTWkEohWIDCZpdeyFrduKCA+TBJcosqiMIX0hNN953ckpEkR3PUdUwIlIkr1GyzCjcrCIXR3qbpQXa5416O7u1bPA0LFo+5fx36kI6YNQGY8R+hiz3VbVzCMcvXifZXlVtAGYPAvRSQIDAQAB"; // GoogleIAB.init( key ); #elif UNITY_IOS if (Instance.isFirstTimeUser) { //Restore Purchase in case ap deleted // StoreKitBinding.restoreCompletedTransactions(); } UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge); UnityEngine.iOS.NotificationServices.ClearLocalNotifications(); UnityEngine.iOS.NotificationServices.CancelAllLocalNotifications(); // clear badge number UnityEngine.iOS.LocalNotification temp = new UnityEngine.iOS.LocalNotification(); temp.fireDate = DateTime.Now; temp.applicationIconBadgeNumber = -1; temp.alertBody = ""; UnityEngine.iOS.NotificationServices.ScheduleLocalNotification(temp); #endif questChecker = transform.GetComponent <QuestCheck>(); HeyzapAds.start("790edd987b2facf1eb7117dfc97d354b", HeyzapAds.FLAG_NO_OPTIONS); DontDestroyOnLoad(gameObject); }