|
写了一段c#代码,如何转化成编辑器触发或galaxy脚本
struct 可用用触发的 录制 来写,其他呢?
- namespace PlanA
- {
- public class DataStruct
- {
- public static int MaxV=500;
- public static int MaxE=2000;
- public static int MaxT = 1000;
- public int PNum = 0;
- public Vertex[] Vertex=new Vertex[MaxV];
- public Edge[] MyEdges = new Edge[MaxE];
- public BouBox BBOX = new BouBox();
- }
-
- public struct Vertex
- {
- public long x;
- public int e;
- public static bool Compare(Vertex a, Vertex b)
- {
- return a.x == b.x && a.y == b.y ;
- }
- }
- public struct Edge
- {
- public long ID;
- public Boolean NotEdge;
- public Edge(long iV1, long iV2)
- {
- ID1 = iV1;
- ID2 = iV2;
- NoEdge = false;
- }
- public struct BouBox
- {
- public long XLeft;
- public long YTop;
- }
- }
复制代码
|
|