public AxisEasingOverrideData Clone() { AxisEasingOverrideData axis_data = new AxisEasingOverrideData(); axis_data.m_override_default = m_override_default; axis_data.m_x_ease = m_x_ease; axis_data.m_y_ease = m_y_ease; axis_data.m_z_ease = m_z_ease; return(axis_data); }
public static void ImportLegacyData(this AxisEasingOverrideData axis_data, string data_string) { string[] data_parts = data_string.Split(new char[] { '|' }); if (int.Parse(data_parts[0]) == 1) { axis_data.m_override_default = true; axis_data.m_x_ease = (EasingEquation)int.Parse(data_parts[1]); axis_data.m_y_ease = (EasingEquation)int.Parse(data_parts[2]); axis_data.m_z_ease = (EasingEquation)int.Parse(data_parts[3]); } else { axis_data.m_override_default = false; } }
public AxisEasingOverrideData Clone() { AxisEasingOverrideData axis_data = new AxisEasingOverrideData(); axis_data.m_override_default = m_override_default; axis_data.m_x_ease = m_x_ease; axis_data.m_y_ease = m_y_ease; axis_data.m_z_ease = m_z_ease; return axis_data; }
float DrawAxisEaseOverrideGUI(AxisEasingOverrideData axis_data, GUIContent label, Rect position) { axis_data.m_override_default = EditorGUI.Toggle(new Rect(position.x, position.y, 200, LINE_HEIGHT), label, axis_data.m_override_default); if(axis_data.m_override_default) { EditorGUI.LabelField(new Rect(position.x + 180, position.y, ENUM_SELECTOR_WIDTH_SMALL, LINE_HEIGHT), "x :"); EditorGUI.LabelField(new Rect(position.x + 180, position.y + LINE_HEIGHT, ENUM_SELECTOR_WIDTH_SMALL, LINE_HEIGHT), "y :"); EditorGUI.LabelField(new Rect(position.x + 180, position.y + LINE_HEIGHT * 2, ENUM_SELECTOR_WIDTH_SMALL, LINE_HEIGHT), "z :"); axis_data.m_x_ease = (EasingEquation) EditorGUI.EnumPopup(new Rect(position.x + 200, position.y, ENUM_SELECTOR_WIDTH_SMALL, LINE_HEIGHT), axis_data.m_x_ease); axis_data.m_y_ease = (EasingEquation) EditorGUI.EnumPopup(new Rect(position.x + 200, position.y + LINE_HEIGHT, ENUM_SELECTOR_WIDTH_SMALL, LINE_HEIGHT), axis_data.m_y_ease); axis_data.m_z_ease = (EasingEquation) EditorGUI.EnumPopup(new Rect(position.x + 200, position.y + (LINE_HEIGHT * 2), ENUM_SELECTOR_WIDTH_SMALL, LINE_HEIGHT), axis_data.m_z_ease); return LINE_HEIGHT * 3; } else { return LINE_HEIGHT; } }