28 lines
639 B
C#
28 lines
639 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Text;
|
|||
|
|
|||
|
namespace ET
|
|||
|
{
|
|||
|
|
|||
|
public class PlayerConfigComponentAwakeSystem : AwakeSystem<PlayerConfigComponent>
|
|||
|
{
|
|||
|
public override async void Awake(PlayerConfigComponent self)
|
|||
|
{
|
|||
|
var list = await DBComponent.Instance.QueryFilter(MongoDB.Driver.Builders<PlayerConfigComponent>.Filter.Ne(t => t.MaxPlayerId, 0), MongoDB.Driver.Builders<PlayerConfigComponent>.Sort.Descending(t=>t.MaxPlayerId));
|
|||
|
if (list.Count > 0)
|
|||
|
{
|
|||
|
self.MaxPlayerId = list[0].MaxPlayerId;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
self.MaxPlayerId = 10000;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
public class PlayerConfigSystem
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
}
|