private void SetBuildedLocalPushNotice() { if (this.isRecieveEndBuildingPushNotice && this.userFacilityList != null && 0 < this.userFacilityList.Count) { List <TimeSpan> list = new List <TimeSpan>(); foreach (UserFacility userFacility in this.userFacilityList) { if (!string.IsNullOrEmpty(userFacility.completeTime)) { DateTime d = DateTime.Parse(userFacility.completeTime); TimeSpan item = d - ServerDateTime.Now; if (item.TotalSeconds > 0.0) { list.Add(item); } } } if (list.Count > 0) { if (list.Count > 1) { list.Sort((TimeSpan a, TimeSpan b) => (int)(a.TotalSeconds - b.TotalSeconds)); } string @string = StringMaster.GetString("LocalNotice-03"); NpPush.LocalPushSendRequestCode(@string, 1, (int)list[0].TotalSeconds, 1); } this.userFacilityList = null; } }
private void SetStaminaLocalPushNotice() { if (this.isRecieveStaminaMaxPushNotice && 0 < this.staminaRecovery) { string @string = StringMaster.GetString("LocalNotice-01"); NpPush.LocalPushSendRequestCode(@string, 1, this.staminaRecovery, 0); this.staminaRecovery = 0; } }
private void ResetGardenPushNotice() { if (this.isRecieveGardenPushNotice) { string @string = PlayerPrefs.GetString("RESERVED_GARDEN_NOTICE", string.Empty); if (string.IsNullOrEmpty(@string)) { if (this.gardenDataList.Count == 0) { return; } } else { if (this.gardenDataList.Count == 0) { PlayerPrefs.DeleteKey("RESERVED_GARDEN_NOTICE"); return; } if (@string != this.gardenDataList[0].monsterID) { PlayerPrefs.DeleteKey("RESERVED_GARDEN_NOTICE"); } else { if ((this.gardenDataList[0].growEndDate - ServerDateTime.Now).TotalSeconds > 0.0) { return; } PlayerPrefs.DeleteKey("RESERVED_GARDEN_NOTICE"); } } foreach (PushNotice.GardenPushNoticeData gardenPushNoticeData in this.gardenDataList) { TimeSpan timeSpan = gardenPushNoticeData.growEndDate - ServerDateTime.Now; if (timeSpan.TotalSeconds > 0.0) { string string2 = StringMaster.GetString("LocalNotice-02"); NpPush.LocalPushSendRequestCode(string2, 1, (int)timeSpan.TotalSeconds, 2); PlayerPrefs.SetString("RESERVED_GARDEN_NOTICE", gardenPushNoticeData.monsterID); break; } } } }
public void FastSetStaminaLocalPushNotice() { global::Debug.Log("+プッシュ通知テスト関数実行"); NpPush.LocalPushSendRequestCode("プッシュテスト", 1, 60, 0); }