//------------------------------------------------------------------------ /*! * @brief 実績解除 <static> * @param[in] EACHIEVEMENT (eID) 実績ID */ //------------------------------------------------------------------------ public static void UnlockAchievement(EACHIEVEMENT eID) { #if GAMECENTER_ANDROID string key = GetAchievementKey(eID); ((PlayGamesPlatform)Social.Active).IncrementAchievement(key, 10000, (bool success) => { if (success) { // 登録成功. #if BUILD_TYPE_DEBUG Debug.Log("UnlockAchievement[" + key + "] : Success"); #endif } else { // 登録失敗. #if BUILD_TYPE_DEBUG Debug.Log("UnlockAchievement[" + key + "] : Failed"); #endif } }); #endif }
//------------------------------------------------------------------------ /*! * @brief 実績解除キー取得 * @param[in] EACHIEVEMENT (eID) 実績ID * @return string [実績キー] */ //------------------------------------------------------------------------ private static string GetAchievementKey(EACHIEVEMENT eID) { int id = (int)eID; string[] key = { #if PROV_JP_EXAMPLE_DGRN "empty", //hands05 "empty", //hands10 "empty", //hands15 "empty", //hands20 "empty", //hands25 "empty", //図鑑10 "empty", //図鑑50 "empty", //図鑑100 "empty", //図鑑150 "empty", //図鑑200 "empty", //図鑑250 "empty", //図鑑300 "empty", //図鑑350 "empty", //無限ダンジョン初級 "empty" //無限ダンジョン中級 #elif PROV_JP_EXAMPLE_DGRN_DEV "empty", //hands05 "empty", //hands10 "empty", //hands15 "empty", //hands20 "empty", //hands25 "empty", //図鑑10 "empty", //図鑑50 "empty", //図鑑100 "empty", //図鑑150 "empty", //図鑑200 "empty", //図鑑250 "empty", //図鑑300 "empty", //図鑑350 "empty", //無限ダンジョン初級 "empty" //無限ダンジョン中級 #elif PROV_JP_EXAMPLE_DGRN_STABLE "empty", //hands05 "empty", //hands10 "empty", //hands15 "empty", //hands20 "empty", //hands25 "empty", //図鑑10 "empty", //図鑑50 "empty", //図鑑100 "empty", //図鑑150 "empty", //図鑑200 "empty", //図鑑250 "empty", //図鑑300 "empty", //図鑑350 "empty", //無限ダンジョン初級 "empty" //無限ダンジョン中級 #else //jp.example.dg "empty", //hands05 "empty", //hands10 "empty", //hands15 "empty", //hands20 "empty", //hands25 "empty", //図鑑10 "empty", //図鑑50 "empty", //図鑑100 "empty", //図鑑150 "empty", //図鑑200 "empty", //図鑑250 "empty", //図鑑300 //"empty", //図鑑350 本番にはない "empty", //無限ダンジョン初級 "empty" //無限ダンジョン中級 #endif }; if (id < 0 && id >= key.Length) { return(""); } return(key[id]); }