Beispiel #1
0
 protected override void OnGameDataReset()
 {
     base.OnGameDataReset();
     m_rankInfo = null;
     m_detailRanking.Clear();
     isUpDanlv  = false;
     m_players  = null;
     Info_sss   = null;
     isbaning   = true;
     beiInvated = false;
 }
Beispiel #2
0
    void _Packet(ScWorldRankInfo p)
    {
        if (p.ranks != null)
        {
            PRank[] ranks = null;
            p.CopyTo(ref m_rankInfo);
            p.ranks.CopyTo(ref ranks);

            m_detailRanking.Clear();
            m_detailRanking.AddRange(ranks);
            if (m_detailRanking.Count > 1)
            {
                m_detailRanking.Sort((a, b) => a.rank.CompareTo(b.rank));
            }

            DispatchModuleEvent(EventDetailRankingForRequest);
        }
    }
Beispiel #3
0
    private ScWorldRankInfo RankingTest()
    {
        ScWorldRankInfo p = PacketObject.Create <ScWorldRankInfo>();

        p.rank  = 3;
        p.danLv = 5;
        p.score = 1600;

        List <PRank> rankings = new List <PRank>();

        for (int i = 0; i < 100; i++)
        {
            PRank ranking = PacketObject.Create <PRank>();
            ranking.rank  = (ushort)(i + 1);
            ranking.danLv = (byte)UnityEngine.Random.Range(1, 9);
            ranking.name  = Util.Format("女生鳝变 {0}", i);
            ranking.guild = Util.Format("鳝变的工会 {0}", i);
            ranking.score = (ushort)(1000 + (500 - i));
            rankings.Add(ranking);
        }
        p.ranks = rankings.ToArray();
        return(p);
    }