protected bool HandleAnchor(ref Vector3 position, bool isConnectedAnchor) { if (Joint2DEditor.s_Styles == null) { Joint2DEditor.s_Styles = new Joint2DEditor.Styles(); } Handles.CapFunction arg_5A_0; if (isConnectedAnchor) { if (Joint2DEditor.< > f__mg$cache0 == null) { Joint2DEditor.< > f__mg$cache0 = new Handles.CapFunction(Joint2DEditor.ConnectedAnchorHandleCap); } arg_5A_0 = Joint2DEditor.< > f__mg$cache0; } else { if (Joint2DEditor.< > f__mg$cache1 == null) { Joint2DEditor.< > f__mg$cache1 = new Handles.CapFunction(Joint2DEditor.AnchorHandleCap); } arg_5A_0 = Joint2DEditor.< > f__mg$cache1; } Handles.CapFunction capFunction = arg_5A_0; int id = base.target.GetInstanceID() + ((!isConnectedAnchor) ? 0 : 1); EditorGUI.BeginChangeCheck(); position = Handles.Slider2D(id, position, Vector3.back, Vector3.right, Vector3.up, 0f, capFunction, Vector2.zero); return(EditorGUI.EndChangeCheck()); }
protected bool HandleAnchor(ref Vector3 position, bool isConnectedAnchor) { if (Joint2DEditor.s_Styles == null) Joint2DEditor.s_Styles = new Joint2DEditor.Styles(); Handles.DrawCapFunction drawFunc = !isConnectedAnchor ? new Handles.DrawCapFunction(Joint2DEditor.AnchorCap) : new Handles.DrawCapFunction(Joint2DEditor.ConnectedAnchorCap); int id = this.target.GetInstanceID() + (!isConnectedAnchor ? 0 : 1); EditorGUI.BeginChangeCheck(); position = Handles.Slider2D(id, position, Vector3.back, Vector3.right, Vector3.up, 0.0f, drawFunc, Vector2.zero); return EditorGUI.EndChangeCheck(); }
protected bool HandleAnchor(ref Vector3 position, bool isConnectedAnchor) { if (Joint2DEditor.s_Styles == null) { Joint2DEditor.s_Styles = new Joint2DEditor.Styles(); } Handles.DrawCapFunction drawFunc = (!isConnectedAnchor) ? new Handles.DrawCapFunction(Joint2DEditor.AnchorCap) : new Handles.DrawCapFunction(Joint2DEditor.ConnectedAnchorCap); int id = this.target.GetInstanceID() + ((!isConnectedAnchor) ? 0 : 1); EditorGUI.BeginChangeCheck(); position = Handles.Slider2D(id, position, Vector3.back, Vector3.right, Vector3.up, 0f, drawFunc, Vector2.zero); return(EditorGUI.EndChangeCheck()); }