private List<GSProto.TankInfoCommander> SortCommanderList(List<GSProto.TankInfoCommander> list)
{
for (int i = 0; i < list.Count; i++)
{
for (int j = i + 1; j < list.Count; j++)
{
LMGame.TankItem heroItem1 = TankFactory.GetInstance().GetTankItem(list[i].iTankID);
LMGame.TankItem heroItem2 = TankFactory.GetInstance().GetTankItem(list[j].iTankID);
if (heroItem1.mNPCType != heroItem2.mNPCType)
{
if (heroItem1.mNPCType != 0)
{
change(list, i, j);
}
}
else if (heroItem1.mEnergyPoint > heroItem2.mEnergyPoint)
{
change(list, i, j);
}
else if (heroItem1.mEnergyPoint == heroItem2.mEnergyPoint && heroItem1.mID > he
C#冒泡排序来进行多条件排序
最新推荐文章于 2023-08-29 19:18:36 发布