| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | |
| | | } |
| | | else |
| | | { |
| | | loginTimeText.text = Language.Get("Guild_61", TimeUtility.SecondsToConsumeRebate(leftTime)); |
| | | } |
| | | loginTimeText.text = Language.Get("Guild_61", SecondsToOnlyTime(leftTime)); |
| | | } |
| | | |
| | | |
| | | showOpBtn.SetActive(PlayerDatas.Instance.fairyData.mine.FmLV >= GuildManager.Instance.GetNeedGuildJobLV((int)GuildFuncType.ChangeJob) |
| | |
| | | showArrowImg.transform.localScale = new Vector3(1, -1, 1); |
| | | } |
| | | } |
| | | |
| | | |
| | | //例子 取整处理, 1.5天 显示1天; 最大7天特殊处理 |
| | | //x天 |
| | | //x时 |
| | | //x分 |
| | | //x秒 |
| | | public static string SecondsToOnlyTime(int _seconds) |
| | | { |
| | | float days = (float)_seconds / 86400; |
| | | float hours = (float)_seconds % 86400 / 3600; |
| | | int mins = _seconds % 3600 / 60; |
| | | float seconds = (float)_seconds % 60; |
| | | if (days >= 1) |
| | | { |
| | | days = Math.Min(days, 7); |
| | | return StringUtility.Concat(((int)days).ToString(), Language.Get("L1074")); |
| | | } |
| | | else if (hours >= 1) |
| | | { |
| | | return StringUtility.Concat(((int)hours).ToString(), Language.Get("L1072")); |
| | | } |
| | | else if (mins >= 1) |
| | | { |
| | | return StringUtility.Concat(mins.ToString(), Language.Get("L1073")); |
| | | } |
| | | else |
| | | { |
| | | return StringUtility.Concat(seconds.ToString(), Language.Get("L1075")); |
| | | } |
| | | } |
| | | } |