12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using Newtonsoft.Json;
- using UnityEngine;
- namespace PublicTools.Unity
- {
- public struct XVector2
- {
-
-
-
- public float x;
-
-
-
- public float y;
-
-
-
-
-
-
-
-
- public XVector2(float x, float y)
- {
- this.x = x;
- this.y = y;
- }
- public XVector2(Vector2 vector2)
- {
- this.x = vector2.x;
- this.y = vector2.y;
- }
- public Vector2 Trans()
- {
- Vector2 vector = Vector2.zero;
- vector.x = this.x;
- vector.y = this.y;
- return vector;
- }
- public void Trans(Vector2 vector2)
- {
- this.x = vector2.x;
- this.y = vector2.y;
- }
- public override string ToString()
- {
- return JsonConvert.SerializeObject(this);
- }
- }
- }
|