mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
32 lines
573 B
C#
32 lines
573 B
C#
#region
|
|
|
|
using Newtonsoft.Json;
|
|
using UnityEngine;
|
|
|
|
#endregion
|
|
|
|
namespace NewHorizons.Utility
|
|
{
|
|
[JsonObject]
|
|
public class MVector2
|
|
{
|
|
public MVector2(float x, float y)
|
|
{
|
|
this.x = x;
|
|
this.y = y;
|
|
}
|
|
|
|
public float x;
|
|
public float y;
|
|
|
|
public static implicit operator MVector2(Vector2 vec)
|
|
{
|
|
return new MVector2(vec.x, vec.y);
|
|
}
|
|
|
|
public static implicit operator Vector2(MVector2 vec)
|
|
{
|
|
return new Vector2(vec.x, vec.y);
|
|
}
|
|
}
|
|
} |