PlayerService.cs 636 B

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