Exemplo n.º 1
0
    private void SetMultiPvpRoleInfoItem(Transform multiPvpRoleInfoItemTrans, MultiPvpRoleInfo roleInfo)
    {
        if (multiPvpRoleInfoItemTrans == null || roleInfo == null)
        {
            return;
        }
        Image component = multiPvpRoleInfoItemTrans.FindChild("RoleIcon").GetComponent <Image>();

        ResourceManager.SetSprite(component, UIUtils.GetRoleHeadIcon(roleInfo.career));
        Text component2 = multiPvpRoleInfoItemTrans.FindChild("RoleLv").GetComponent <Text>();

        component2.set_text(roleInfo.roleLv + string.Empty);
        Text component3 = multiPvpRoleInfoItemTrans.FindChild("RoleName").GetComponent <Text>();

        component3.set_text(roleInfo.roleName + string.Empty);
        GameObject gameObject = multiPvpRoleInfoItemTrans.FindChild("KillBossMark").get_gameObject();

        gameObject.get_gameObject().SetActive(roleInfo.killBossCount > 0);
        Text component4 = multiPvpRoleInfoItemTrans.FindChild("KillNum").GetComponent <Text>();

        component4.set_text(roleInfo.killCount + string.Empty);
        Text component5 = multiPvpRoleInfoItemTrans.FindChild("DeathNum").GetComponent <Text>();

        component5.set_text(roleInfo.deathCount + string.Empty);
        Text component6 = multiPvpRoleInfoItemTrans.FindChild("ScoreNum").GetComponent <Text>();

        component6.set_text(roleInfo.score + string.Empty);
        Text component7 = multiPvpRoleInfoItemTrans.FindChild("MultiKillNum").GetComponent <Text>();

        component7.set_text((roleInfo.maxCombo <= 1) ? string.Empty : ("连杀x" + roleInfo.maxCombo));
    }
Exemplo n.º 2
0
    private static int MultiPvpRankingSortCompare(MultiPvpRoleInfo AF1, MultiPvpRoleInfo AF2)
    {
        int result = 0;

        if (AF1.score > AF2.score)
        {
            return(-1);
        }
        if (AF1.score == AF2.score && AF1.roleLv >= AF1.roleLv)
        {
            return(-1);
        }
        if (AF1.score < AF2.score)
        {
            return(1);
        }
        return(result);
    }