报错修改
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public static class VectorExtension {
|
||||
|
||||
|
||||
public static Vector3Ctor GetVector3Ctor(this Vector3 vector)
|
||||
{
|
||||
return new Vector3Ctor(vector);
|
||||
}
|
||||
|
||||
public static Vector3 SetVector3Ctor(this Vector3Ctor vector3Ctor)
|
||||
{
|
||||
return new Vector3(vector3Ctor.x, vector3Ctor.y, vector3Ctor.z);
|
||||
}
|
||||
|
||||
public static Vector2Ctor GetVector2Ctor( this Vector2 vector)
|
||||
{
|
||||
return new Vector2Ctor(vector);
|
||||
}
|
||||
|
||||
public static Vector2 SetVector2Data(this Vector2Ctor vector3Ctor)
|
||||
{
|
||||
return new Vector2(vector3Ctor.x, vector3Ctor.y);
|
||||
}
|
||||
|
||||
}
|
||||
[Serializable]
|
||||
public class Vector3Ctor
|
||||
{
|
||||
public float x;
|
||||
public float y;
|
||||
public float z;
|
||||
|
||||
public Vector3Ctor()
|
||||
{
|
||||
|
||||
}
|
||||
public Vector3Ctor(Vector3 vector)
|
||||
{
|
||||
x = vector.x;
|
||||
y = vector.y;
|
||||
z = vector.z;
|
||||
}
|
||||
public Vector3Ctor(float x, float y, float z)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
public class Vector2Ctor
|
||||
{
|
||||
public float x;
|
||||
public float y;
|
||||
|
||||
public Vector2Ctor(Vector2 vector)
|
||||
{
|
||||
x = vector.x;
|
||||
y = vector.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user