Beispiel #1
0
    public override void OnNavigatedTo()
    {
        var list = ImitateRankManager.IORankData;

        for (int i = 0; i < 6; i++)
        {
            var control = rowList[i];
            if (i < list.Count)
            {
                var data = list[i];
                control.PlayerName = data.name;
                control.Score      = data.score;
                var iconName   = data.icon;
                var iconSprite = ImitateUtilResManager.Load <Sprite>(iconName);
                control.Icon = iconSprite;
                var rank = i + 1;
                control.Rank = rank;
                control.gameObject.SetActive(true);
            }
            else
            {
                control.gameObject.SetActive(false);
            }
        }
    }
Beispiel #2
0
    public static Texture GetSprite()
    {
        var index  = levelIndex % 3 + 1;
        var name   = $"pic{index}";
        var sprite = ImitateUtilResManager.Load <Texture>(name);

        return(sprite);
    }