public static void onArchiments() { SX_GameCenter GameCenter = SX.GetComponent <SX_GameCenter>(); if (PlayerPrefs.GetInt("Star") >= 15 && !PlayerPrefs.HasKey("achievement_100")) { PlayerPrefs.SetInt("achievement_100", 1); GameCenter.unlockAchievement("CgkI7tzVk6UREAIQAQ"); } if (PlayerPrefs.GetInt("Star") >= 30 && !PlayerPrefs.HasKey("achievement_200")) { PlayerPrefs.SetInt("achievement_200", 1); GameCenter.unlockAchievement("CgkI7tzVk6UREAIQAg"); } if (PlayerPrefs.GetInt("Star") >= 40 && !PlayerPrefs.HasKey("achievement_300")) { PlayerPrefs.SetInt("achievement_300", 1); GameCenter.unlockAchievement("CgkI7tzVk6UREAIQAw"); } if (PlayerPrefs.GetInt("Star") >= 50 && !PlayerPrefs.HasKey("achievement_400")) { PlayerPrefs.SetInt("achievement_400", 1); GameCenter.unlockAchievement("CgkI7tzVk6UREAIQBA"); } if (PlayerPrefs.GetInt("Star") >= 60 && !PlayerPrefs.HasKey("achievement_500")) { PlayerPrefs.SetInt("achievement_500", 1); GameCenter.unlockAchievement("CgkI7tzVk6UREAIQBQ"); } if (PlayerPrefs.GetInt("Star") >= 75 && !PlayerPrefs.HasKey("achievement_600")) { PlayerPrefs.SetInt("achievement_600", 1); GameCenter.unlockAchievement("CgkI7tzVk6UREAIQBw"); } if (PlayerPrefs.GetInt("Coin") >= 1000 && !PlayerPrefs.HasKey("coin_1000")) { PlayerPrefs.SetInt("coin_1000", 1); GameCenter.unlockAchievement("CgkI7tzVk6UREAIQCA"); } else if (PlayerPrefs.GetInt("Coin") >= 2000 && !PlayerPrefs.HasKey("coin_2000")) { PlayerPrefs.SetInt("coin_2000", 1); GameCenter.unlockAchievement("CgkI7tzVk6UREAIQCQ"); } else if (PlayerPrefs.GetInt("Coin") >= 3000 && !PlayerPrefs.HasKey("coin_3000")) { PlayerPrefs.SetInt("coin_3000", 1); GameCenter.unlockAchievement("CgkI7tzVk6UREAIQCg"); } else if (PlayerPrefs.GetInt("Coin") >= 4000 && !PlayerPrefs.HasKey("coin_4000")) { PlayerPrefs.SetInt("coin_4000", 1); GameCenter.unlockAchievement("CgkI7tzVk6UREAIQDA"); } else if (PlayerPrefs.GetInt("Coin") >= 5000 && !PlayerPrefs.HasKey("coin_5000")) { PlayerPrefs.SetInt("coin_5000", 1); GameCenter.unlockAchievement("CgkI7tzVk6UREAIQCw"); } }
public static void onArchiments() { SX_GameCenter GameCenter = SX.GetComponent <SX_GameCenter>(); if (PlayerPrefs.GetInt("Star") >= 100 && !PlayerPrefs.HasKey("CgkIo9v11o8TEAIQAQ")) { GameCenter.unlockAchievement("CgkIo9v11o8TEAIQAQ"); } if (PlayerPrefs.GetInt("Star") >= 200 && !PlayerPrefs.HasKey("CgkIo9v11o8TEAIQAg")) { GameCenter.unlockAchievement("CgkIo9v11o8TEAIQAg"); } if (PlayerPrefs.GetInt("Star") >= 300 && !PlayerPrefs.HasKey("CgkIo9v11o8TEAIQAw")) { GameCenter.unlockAchievement("CgkIo9v11o8TEAIQAw"); } if (PlayerPrefs.GetInt("Star") >= 400 && !PlayerPrefs.HasKey("CgkIo9v11o8TEAIQBA")) { GameCenter.unlockAchievement("CgkIo9v11o8TEAIQBA"); } if (PlayerPrefs.GetInt("Star") >= 500 && !PlayerPrefs.HasKey("CgkIo9v11o8TEAIQBQ")) { GameCenter.unlockAchievement("CgkIo9v11o8TEAIQBQ"); } if (PlayerPrefs.GetInt("Star") >= 600 && !PlayerPrefs.HasKey("CgkIo9v11o8TEAIQBw")) { GameCenter.unlockAchievement("CgkIo9v11o8TEAIQBw"); } if (PlayerPrefs.GetInt("Coin") >= 1000 && !PlayerPrefs.HasKey("CgkIo9v11o8TEAIQCA")) { GameCenter.unlockAchievement("CgkIo9v11o8TEAIQCA"); } else if (PlayerPrefs.GetInt("Coin") >= 2000 && !PlayerPrefs.HasKey("CgkIo9v11o8TEAIQCQ")) { GameCenter.unlockAchievement("CgkIo9v11o8TEAIQCQ"); } else if (PlayerPrefs.GetInt("Coin") >= 3000 && !PlayerPrefs.HasKey("CgkIo9v11o8TEAIQCg")) { GameCenter.unlockAchievement("CgkIo9v11o8TEAIQCg"); } else if (PlayerPrefs.GetInt("Coin") >= 4000 && !PlayerPrefs.HasKey("CgkIo9v11o8TEAIQCw")) { GameCenter.unlockAchievement("CgkIo9v11o8TEAIQCw"); } else if (PlayerPrefs.GetInt("Coin") >= 5000 && !PlayerPrefs.HasKey("CgkIo9v11o8TEAIQDA")) { GameCenter.unlockAchievement("CgkIo9v11o8TEAIQDA"); } }