49 lines
881 B
C#
49 lines
881 B
C#
|
using UnityEngine;
|
|||
|
using System.Collections;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
public class FactionAdvanceItem : MonoBehaviour
|
|||
|
{
|
|||
|
|
|||
|
#region
|
|||
|
public Sprite[] allRanIcon; //排名前三特殊标记
|
|||
|
|
|||
|
public Image myRankIcon;
|
|||
|
|
|||
|
public Text rankText;
|
|||
|
public Text nameText;
|
|||
|
public Text levelText;
|
|||
|
public Text timeText;
|
|||
|
|
|||
|
public ulong guid;
|
|||
|
public Sprite[] rankIcons;
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
|
|||
|
string calculateTime(int time)
|
|||
|
{
|
|||
|
int minute = time / 60;
|
|||
|
int second = time % 60;
|
|||
|
if (second < 10)
|
|||
|
{
|
|||
|
return (minute.ToString() + ":0" + second.ToString());
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
return (minute.ToString() + ":" + second.ToString());
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
bool isInRank(int rank)
|
|||
|
{
|
|||
|
if(rank <= 3 && rank >= 1)
|
|||
|
{
|
|||
|
return true;
|
|||
|
}
|
|||
|
return false;
|
|||
|
}
|
|||
|
|
|||
|
}
|