报错修改

This commit is contained in:
2025-07-02 10:05:26 +08:00
parent c2bf9196b8
commit ec8b2f7e25
405 changed files with 16738 additions and 1883 deletions

View File

@@ -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;
}
}
}