| 12345678910111213141516171819202122232425262728293031323334353637 |
- using System.Collections.Generic;
- namespace ET
- {
- public class GalleryRankByCreateTimeComponent : Entity, IAwake, IDestroy
- {
- public Dictionary<long, GalleryRankInfoByCreateTime> RankInfoDIc = new Dictionary<long, GalleryRankInfoByCreateTime>();
- public SortedList<GalleryRankInfoByCreateTime, long> RankList = new SortedList<GalleryRankInfoByCreateTime, long>(new GalleryRankByCreateTimeCompare());
- }
- public class GalleryRankByCreateTimeCompare : IComparer<GalleryRankInfoByCreateTime>
- {
- public int Compare(GalleryRankInfoByCreateTime a, GalleryRankInfoByCreateTime b)
- {
- if (a.IsDisposed || b.IsDisposed)
- {
- return 0;
- }
- int result = (int)(b.CreateTime - a.CreateTime);
- if (result != 0)
- {
- return result;
- }
- if (b.Id > a.Id)
- {
- return 1;
- }
- if (b.Id < a.Id)
- {
- return -1;
- }
- return 0;
- }
- }
- }
|