static public void DrawPoint(Transform point, Transform teleporter, Color color, bool single = false) { if (point == null) { return; } Handles.color = Color.white; if (Handles.Button(point.position, point.rotation, 0.8f, 0.8f, Handles.SphereHandleCap)) { MapDescriptorEditor.moveTo(point); } Handles.color = color; HandleHelpers.DrawArrow(teleporter.position, point.position, 2.0f); Handles.color = Color.blue; HandleHelpers.DrawArrow(point.position, point.position + point.forward * 1.75f, 1.5f); if (single) { HandleHelpers.Label(point.position + Vector3.up, point.gameObject.name); } else { HandleHelpers.ResizeLabel(point.position + Vector3.up, point.gameObject.name); } }
public static void DrawRoundEnd(VmodMonkeMapLoader.Behaviours.RoundEndActions roundEndActions, bool single = false) { Handles.color = (Color.green + Color.black) / 2; float size = 10.0f; foreach (var point in roundEndActions.ObjectsToEnable) { if (Handles.Button(point.transform.position, point.transform.rotation, size, size, Handles.SphereHandleCap)) { MapDescriptorEditor.moveTo(point.transform); } HandleHelpers.Label(point.transform.position + Vector3.up * (size * .5f) + Vector3.up, new GUIContent(point.name), single); } Handles.color = (Color.red + Color.black) / 2; foreach (var point in roundEndActions.ObjectsToDisable) { if (Handles.Button(point.transform.position, point.transform.rotation, size, size, Handles.SphereHandleCap)) { MapDescriptorEditor.moveTo(point.transform); } HandleHelpers.Label(point.transform.position + Vector3.up * (size * .5f) + Vector3.up, new GUIContent(point.name), single); } }
public static void DrawTagZone(VmodMonkeMapLoader.Behaviours.TagZone zone, bool single = false) { Handles.color = Color.red; if (Handles.Button(zone.transform.position, zone.transform.rotation, 1.0f, 1.0f, Handles.CubeHandleCap)) { MapDescriptorEditor.moveTo(zone.transform); } HandleHelpers.Label(zone.transform.position + Vector3.up, new GUIContent(zone.gameObject.name)); }
public static void DrawSpawnPoint(Transform point) { Handles.color = Color.magenta; if (Handles.Button(point.position, point.rotation, 1.0f, 1.0f, Handles.CubeHandleCap)) { moveTo(point); } HandleHelpers.Label(point.position + Vector3.up * point.lossyScale.y, new GUIContent(point.gameObject.name)); }