namespace ET.Server { [FriendOf(typeof (PlayerMoneyComponent))] public static class PlayerMoneyComponentSystem { public class PlayerMoneyComponentAwakeSystem: AwakeSystem { /// /// 玩家货币组件创建 /// /// /// protected override void Awake(PlayerMoneyComponent self, WNPlayer player) { Log.Info($"创建玩家货币组件..."); self.Player = player; } } public class PlayerMoneyComponentDestroySystem: DestroySystem { /// /// 玩家货币组件销毁 /// /// protected override void Destroy(PlayerMoneyComponent self) { Log.Debug($"玩家货币数据保存"); self?.Save(); } } /// /// 初始化 /// /// public static async ETTask Init(this PlayerMoneyComponent self) { await ETTask.CompletedTask; } public static async ETTask Save(this PlayerMoneyComponent self) { await ETTask.CompletedTask; } } }