我正在将C ++代码翻译为C#,现在我遇到了这个问题,所以我无法调用我需要调用的函数。
public struct TargetList_t
{
public float Distance;
public float[] AimbotAngle = new float[3];
public float[] aimbotAngle = new float[3];
public float[] myCoords = new float[3];
public float[] enemyCoords = new float[3];
public TargetList_t(float[] aimbotAngle, float[] myCoords, float[] enemyCoords)
{
Distance = Get3dDistance(myCoords[0], myCoords[1], myCoords[3], enemyCoords[0], enemyCoords[1], enemyCoords[2]);
AimbotAngle[0] = aimbotAngle[0];
AimbotAngle[1] = aimbotAngle[1];
AimbotAngle[2] = aimbotAngle[2];
}
};
这是我的课程。
TargetList_t TargList;
这就是我尝试达成它的方式。
TargetList_t TargList = new TargetList_t(aimbotAngle, myCoors, ... 其他参数);
- Ilya Ivanov