PlayerService.cs 559 B

1234567891011121314151617181920212223
  1. using XGame;
  2. using XGame.Framework.Data;
  3. namespace FL.Data
  4. {
  5. public class PlayerService : DataSingleton<PlayerService>
  6. {
  7. /// <summary>
  8. /// 模拟初始化数据
  9. /// </summary>
  10. public void Mock()
  11. {
  12. var data = PlayerData.Instance;
  13. data.UID = UIDDefine.New();
  14. data.Name = "player";
  15. var attr = PlayerData.Instance.Attr;
  16. attr.Hp = 10000;
  17. attr.HpLimit = 10000;
  18. attr.MoveSpeed = 5;
  19. attr.Attack = 15;
  20. }
  21. }
  22. }