酒馆战棋获取对战结果里的排名

 

GAMEPLAY_END_OF_GAME_PLACE_1 第一名!!
GAMEPLAY_END_OF_GAME_PLACE_2 第二名!
GAMEPLAY_END_OF_GAME_PLACE_3 第三名!
GAMEPLAY_END_OF_GAME_PLACE_4 第四名!
GAMEPLAY_END_OF_GAME_PLACE_5 第五名
GAMEPLAY_END_OF_GAME_PLACE_6 第六名
GAMEPLAY_END_OF_GAME_PLACE_7 第七名
GAMEPLAY_END_OF_GAME_PLACE_8 第八名

 

复制代码
// TB_BaconShop
// Token: 0x06004278 RID: 17016 RVA: 0x00168EE4 File Offset: 0x001670E4
public override string GetVictoryScreenBannerText()
{
    int realTimePlayerLeaderboardPlace = GameState.Get().GetFriendlySidePlayer().GetHero().GetRealTimePlayerLeaderboardPlace();
    if (realTimePlayerLeaderboardPlace == 0)
    {
        return string.Empty;
    }
    return GameStrings.Get("GAMEPLAY_END_OF_GAME_PLACE_" + realTimePlayerLeaderboardPlace);
}
复制代码

 

// VictoryTwoScoop
// Token: 0x0600217C RID: 8572 RVA: 0x000AC3B4 File Offset: 0x000AA5B4
protected void SetupBannerText()
{
    string victoryScreenBannerText = GameState.Get().GetGameEntity().GetVictoryScreenBannerText();
    base.SetBannerLabel(victoryScreenBannerText);
}

 

下面这段代码,同时也负责显示了分数的变化

复制代码
// BaconTwoScoop
// Token: 0x0600208D RID: 8333 RVA: 0x000A78EC File Offset: 0x000A5AEC
private IEnumerator ShowWhenReady()
{
    this.m_Root.SetActive(false);
    this.m_heroActor.gameObject.SetActive(false);
    while (GameState.Get() == null || GameState.Get().GetGameEntity() == null)
    {
        yield return null;
    }
    TB_BaconShop baconGameEntity = null;
    if (GameState.Get().GetGameEntity() is TB_BaconShop)
    {
        baconGameEntity = (TB_BaconShop)GameState.Get().GetGameEntity();
    }
    if (GameState.Get().GetBooleanGameOption(GameEntityOption.WAIT_FOR_RATING_INFO))
    {
        while (baconGameEntity != null && baconGameEntity.RatingChangeData == null && this.m_waitForRatingTimeoutTimer < 5f)
        {
            this.m_waitForRatingTimeoutTimer += Time.unscaledDeltaTime;
            yield return null;
        }
    }
    this.m_Root.SetActive(true);
    this.m_heroActor.gameObject.SetActive(true);
    base.SetupHeroActor();
    base.SetupBannerText();
    this.SetupTwoScoopForPlace();
    if (GameMgr.Get().IsSpectator() || baconGameEntity == null || baconGameEntity.RatingChangeData == null)
    {
        this.m_RatingBanner.SetActive(false);
    }
    else
    {
        this.m_newRating = baconGameEntity.RatingChangeData.NewRating;
        this.m_ratingChange = baconGameEntity.RatingChangeData.RatingChange;
        this.m_RatingBanner.SetActive(true);
        yield return this.PlayRatingChangeAnimation();
    }
    yield break;
}
复制代码

 

作者:Chuck Lu    GitHub    
posted @   ChuckLu  阅读(517)  评论(2编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2016-08-29 asynchronous vs non-blocking
2015-08-29 git svn cygwin_exception
2015-08-29 cmd常用命令
点击右上角即可分享
微信分享提示