Vec3.cs 702 B

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