Vec2.cs 619 B

123456789101112131415161718192021222324252627
  1. // Generate By EToy
  2. // Don't Edit It!!
  3. using XGame.Framework.Serialization;
  4. namespace XGame.Database
  5. {
  6. /// <summary>
  7. /// 2维坐标
  8. /// </summary>
  9. public sealed class Vec2 : ISerializable
  10. {
  11. public float X { get; private set; }
  12. public float Y { get; private set; }
  13. void ISerializable.Deserialize(IReader reader)
  14. {
  15. X = reader.ReadFloat();
  16. Y = reader.ReadFloat();
  17. }
  18. void ISerializable.Serialize(IWriter writer)
  19. {
  20. writer.Write(X);
  21. writer.Write(Y);
  22. }
  23. }
  24. }