public override void OnInspectorGUI() { raceSet = (RaceSet)target; if (GUILayout.Button("进入编辑模式") && AidNode == null) { AidNode = new GameObject("Aid Node", typeof(LineRenderer)); AidNode.GetComponent <LineRenderer>().positionCount = raceSet.raceNodes.Length; AidNode.GetComponent <LineRenderer>().SetPositions(raceSet.raceNodes); IconManager.SetIcon(AidNode, IconManager.LabelIcon.Orange); LockEditor(); } if (AidNode) { if (GUILayout.Button("关闭编辑模式")) { DestroyImmediate(AidNode); UnlockEditor(); } } base.OnInspectorGUI(); if (GUI.changed) { EditorUtility.SetDirty(target); } }
public RaceSet(RaceSet other) : this(bwapiPINVOKE.new_RaceSet__SWIG_1(RaceSet.getCPtr(other)), true) { if (bwapiPINVOKE.SWIGPendingException.Pending) { throw bwapiPINVOKE.SWIGPendingException.Retrieve(); } }
public RaceSetEnumerator(RaceSet collection) { collectionRef = collection; keyCollection = new global::System.Collections.Generic.List <Race>(collection.Values); currentIndex = -1; currentObject = null; currentSize = collectionRef.Count; }
public void StartRace(System.Action onRaceOver) { raceSet = Instantiate(Resources.Load <RaceSet>("Modules/DesertRace")); CheckPoint = Instantiate(Resources.Load <Transform>("Modules/CheckPoint")); raceTimeMesh = CheckPoint.Find("Time").GetComponent <TextMesh>(); for (int i = 0; i < raceSet.raceNodes.Length; i++) { nodes.Enqueue(raceSet.raceNodes[i]); } t = 0; StartCoroutine(RacelogicLoop(onRaceOver)); }
public void SetRace(RaceEnum race) { Race = Enum.GetName(typeof(RaceEnum), race); RaceSet?.Invoke(race); }
public static RaceSet allRaces() { RaceSet ret = new RaceSet(bwapiPINVOKE.allRaces(), false); return ret; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RaceSet obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }