From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- Client/Assets/Scripts/XMainClient/KKSG/Vec3.cs | 148 +++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/Vec3.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/Vec3.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/Vec3.cs b/Client/Assets/Scripts/XMainClient/KKSG/Vec3.cs new file mode 100644 index 00000000..16d25582 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/Vec3.cs @@ -0,0 +1,148 @@ +using System; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "Vec3")] + [Serializable] + public class Vec3 : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "x", DataFormat = DataFormat.FixedSize)] + public float x + { + get + { + return this._x ?? 0f; + } + set + { + this._x = new float?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool xSpecified + { + get + { + return this._x != null; + } + set + { + bool flag = value == (this._x == null); + if (flag) + { + this._x = (value ? new float?(this.x) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "y", DataFormat = DataFormat.FixedSize)] + public float y + { + get + { + return this._y ?? 0f; + } + set + { + this._y = new float?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool ySpecified + { + get + { + return this._y != null; + } + set + { + bool flag = value == (this._y == null); + if (flag) + { + this._y = (value ? new float?(this.y) : null); + } + } + } + + [ProtoMember(3, IsRequired = false, Name = "z", DataFormat = DataFormat.FixedSize)] + public float z + { + get + { + return this._z ?? 0f; + } + set + { + this._z = new float?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool zSpecified + { + get + { + return this._z != null; + } + set + { + bool flag = value == (this._z == null); + if (flag) + { + this._z = (value ? new float?(this.z) : null); + } + } + } + + private float? _x; + + private float? _y; + + private float? _z; + + private IExtension extensionObject; + + private bool ShouldSerializex() + { + return this.xSpecified; + } + + private void Resetx() + { + this.xSpecified = false; + } + + private bool ShouldSerializey() + { + return this.ySpecified; + } + + private void Resety() + { + this.ySpecified = false; + } + + private bool ShouldSerializez() + { + return this.zSpecified; + } + + private void Resetz() + { + this.zSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0