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