public override void ShowGUI(List<ActionParameter> parameters) { parameterID = Action.ChooseParameterGUI ("Moveable object:", parameters, parameterID, ParameterType.GameObject); if (parameterID >= 0) { constantID = 0; linkedProp = null; } else { linkedProp = (Moveable) EditorGUILayout.ObjectField ("Moveable object:", linkedProp, typeof (Moveable), true); constantID = FieldToID <Moveable> (linkedProp, constantID); linkedProp = IDToField <Moveable> (linkedProp, constantID, false); } EditorGUILayout.BeginHorizontal (); transformType = (TransformType) EditorGUILayout.EnumPopup (transformType); if (transformType != TransformType.CopyMarker) { toBy = (ToBy) EditorGUILayout.EnumPopup (toBy); } EditorGUILayout.EndHorizontal (); if (transformType == TransformType.CopyMarker) { markerParameterID = Action.ChooseParameterGUI ("Marker:", parameters, markerParameterID, ParameterType.GameObject); if (markerParameterID >= 0) { markerID = 0; marker = null; } else { marker = (Marker) EditorGUILayout.ObjectField ("Marker:", marker, typeof (Marker), true); markerID = FieldToID <Marker> (marker, markerID); marker = IDToField <Marker> (marker, markerID, false); } } else { newVector = EditorGUILayout.Vector3Field ("Vector:", newVector); } transitionTime = EditorGUILayout.Slider ("Transition time:", transitionTime, 0, 10f); if (transitionTime > 0f) { if (transformType == TransformType.Rotate) { doEulerRotation = EditorGUILayout.Toggle ("Euler rotation?", doEulerRotation); } moveMethod = (MoveMethod) EditorGUILayout.EnumPopup ("Move method", moveMethod); if (moveMethod == MoveMethod.CustomCurve) { timeCurve = EditorGUILayout.CurveField ("Time curve:", timeCurve); } willWait = EditorGUILayout.Toggle ("Wait until finish?", willWait); } AfterRunningOption (); }
public override void AssignValues(List<ActionParameter> parameters) { linkedProp = AssignFile <Moveable> (parameters, parameterID, constantID, linkedProp); }
override public void AssignValues (List<ActionParameter> parameters) { linkedProp = AssignFile <Moveable> (parameters, parameterID, constantID, linkedProp); marker = AssignFile <Marker> (parameters, markerParameterID, markerID, marker); }