public static void Main() { int n; @int n2 = new @int(); n2.show(); where w = new where (); }
private static void Main() { @bool b = false; @string s = "hello"; @int i = 12; EmptyInterface eb = b; EmptyInterface ai = (@int)12; //@string y1 = 0x266c; //char x = '\x266c'; //Console.WriteLine(x); Main1(); Main2(); Main3(); Main4(); Main5(); Main6(); Main7(); ref int value = ref Main8();
public _Main_s_type(@int i = default, @bool b = default) { this.i = i; this.b = b; }
public Vertex(@int X = default, @int Y = default) { this.X = X; this.Y = Y; }
public Account(User User, @int MyFloat) { this.User = User; this.MyFloat = MyFloat; }
/* comment after function * Hello! */ // Test function private static void test(@int a, int16 b, slice <@byte> c) { fmt.Println(a); }
/* comment - another */ public static @int DoIt(@string b, @int _p0) { // here fmt.Println(b); return(0); }
private static (message, err) noComment(@string ya, @int andAnother, @string _p0) { }
/// <summary> /// 寻路 /// </summary> /// <param name="start"></param> /// <param name="end"></param> /// <param name="limit"></param> /// <returns></returns> public static List <Coordinate> FindPath(Coordinate start, Coordinate end, int limit = 5000) { var path = new List <Coordinate>(); var openSet = new HashSet <Coordinate>(); minHeap.Clear(); var closeSet = new HashSet <Coordinate>(); var curNode = new @int(start); closeSet.Add(curNode.Coordinate); var loopNum = 0; while (curNode != null && curNode.Coordinate != end) { loopNum++; if (loopNum > limit) { Debug.Log("死循环"); return(new List <Coordinate>()); } for (var i = 0; i < 4; i++) { var nCoord = curNode.Coordinate.GetNeightbour(i); var grid = MapAreaMgr.Instance.GetGrid(nCoord); if (grid != null && !grid.IsWall && !closeSet.Contains(nCoord)) { var g = curNode.G + (i < 4 ? 10 : 14); var h = (int)(nCoord.Distance(end) * 10); if (!openSet.Contains(nCoord)) { var node = new @int(nCoord) { G = g, H = h, Parent = curNode, }; openSet.Add(nCoord); minHeap.Add(node); } } } curNode = minHeap.GetMin(); closeSet.Add(curNode.Coordinate); } while (curNode != null) { path.Add(curNode.Coordinate); curNode = curNode.Parent; } path.Reverse(); return(path); }
public static @bool Less(this PeopleByShoeSize p, @int i, @int j) { return(p[i].ShoeSize < p[j].ShoeSize); }
public static void Swap(this PeopleByShoeSize p, @int i, @int j) { p[i] = p[j]; p[j] = p[i]; }
public DoDad(@int I, @string O, @string[][] a) { this.I = I; this.O = O; this.a = a; }
public span(@int start, @int end, @int another) { this.start = start; this.end = end; this.another = another; }
public Person(@string Name, @int Age, float32 ShoeSize) { this.Name = Name; this.Age = Age; this.ShoeSize = ShoeSize; }
public User(@int Id, @string Name) { this.Id = Id; this.Name = Name; }
private static void f(@int y) { fmt.Print(y); }
public Vertex(@int X, @int Y, DoDad DoDad) { this.X = X; this.Y = Y; this.m_DoDadRef = new Ref <DoDad>(DoDad); }
public bool Contains(@int n) { return(haseSet.Contains(n)); }