public AMActionFieldSet(AMKey key, int frameRate, object target, FieldInfo f, object val) : base(key, frameRate) { mObj = target; mField = f; mVal = val; }
public static void setValues(AMKey _key, AMTrack _track) { justSet = true; key = _key; track = _track; //aData = _aData; selectedIndex = key.easeType; }
// copy properties from key public override void CopyTo(AMKey key) { AMTriggerKey a = key as AMTriggerKey; a.enabled = false; a.frame = frame; a.valueString = valueString; a.valueInt = valueInt; a.valueFloat = valueFloat; }
// copy properties from key public override void CopyTo(AMKey key) { AMAnimationKey a = key as AMAnimationKey; a.enabled = false; a.frame = frame; a.wrapMode = wrapMode; a.amClip = amClip; a.crossfade = crossfade; }
// copy properties from key public override void CopyTo(AMKey key) { AMAudioKey a = key as AMAudioKey; a.enabled = false; a.frame = frame; a.audioClip = audioClip; a.loop = loop; a.oneShot = oneShot; }
// copy properties from key public override void CopyTo(AMKey key) { AMRotationEulerKey a = key as AMRotationEulerKey; a.enabled = false; a.frame = frame; a.rotation = rotation; a.easeType = easeType; a.customEase = new List<float>(customEase); }
public override void CopyTo(AMKey key) { AMOrientationKey a = key as AMOrientationKey; a.enabled = false; a.frame = frame; a.target = target; a.targetPath = targetPath; a.easeType = easeType; a.customEase = new List<float>(customEase); }
public override void CopyTo(AMKey key) { AMCameraSwitcherKey a = key as AMCameraSwitcherKey; a.type = type; a._camera = _camera; a._cameraPath = _cameraPath; a.color = color; a.cameraFadeType = cameraFadeType; a.cameraFadeParameters = new List<float>(cameraFadeParameters); a.irisShape = irisShape; a.still = still; }
/*public bool setParameters(object[] parameters) { if(this.parameters != parameters) { this.parameters = parameters; return true; } return false; }*/ // copy properties from key public override void CopyTo(AMKey key) { AMEventKey a = key as AMEventKey; a.enabled = false; a.frame = frame; a.component = component; a.componentName = componentName; a.useSendMessage = useSendMessage; // parameters a.methodName = methodName; a.cachedMethodInfo = cachedMethodInfo; foreach(AMEventParameter e in parameters) { a.parameters.Add(e.CreateClone()); } }
public void reloadAnimatorData() { aData = null; loadAnimatorData(); AMTake take = aData.getCurrentTake(); // update references for track and key bool shouldClose = true; foreach(AMTrack _track in take.trackValues) { if(track == _track) { track = _track; foreach(AMKey _key in track.keys) { if(key == _key) { key = _key; shouldClose = false; } } } } if(shouldClose) this.Close(); }
public void Insert(AMKey key, Tweener tween) { mSequence.Insert(key.getWaitTime(mTake.frameRate, 0.0f), tween); }
public AMActionGOActive(AMKey key, int frameRate, GameObject target, bool val) : base(key, frameRate) { mGO = target; mVal = val; }
void OnAutoKey(AMTrack track, AMKey key) { if(key != null) { Undo.RegisterCreatedObjectUndo(key, "Auto Key"); } }
public AMActionTransLocalRotEulerZ(AMKey key, int frameRate, Transform target, float val) : base(key, frameRate, target, val) { }
public AMActionTransLocalRotEulerVal(AMKey key, int frameRate, Transform target, float val) : base(key, frameRate) { mTrans = target; mVal = val; }
public AMActionMaterialTexOfsSet(AMKey key, int frameRate, Material mat, string prop, Vector2 ofs) : base(key, frameRate, mat, prop) { mOfs = ofs; }
public AMActionMaterialFloatSet(AMKey key, int frameRate, Material mat, string prop, float val) : base(key, frameRate, mat, prop) { mVal = val; }
public AMActionData(AMKey key, int frameRate) { mStartTime = key.getWaitTime(frameRate, 0.0f); mEndTime = mStartTime + ((float)key.getNumberOfFrames(frameRate))/((float)frameRate); }
public AMActionSpriteSet(AMKey key, int frameRate, SpriteRenderer target, Sprite spr) : base(key, frameRate) { mSpriteRender = target; mSprite = spr; }
public AMActionPropertySet(AMKey key, int frameRate, object target, PropertyInfo prop, object val) : base(key, frameRate) { mObj = target; mProp = prop; mVal = val; }
public AMActionMaterialVectorSet(AMKey key, int frameRate, Material mat, string prop, Vector4 val) : base(key, frameRate, mat, prop) { mVal = val; }
public AMActionMaterialTexSet(AMKey key, int frameRate, Material mat, string prop, Texture tex) : base(key, frameRate, mat, prop) { mTex = tex; }
public AMActionMaterialTexScaleSet(AMKey key, int frameRate, Material mat, string prop, Vector2 s) : base(key, frameRate, mat, prop) { mScale = s; }
void OnDisable() { window = null; justSet = false; key = null; track = null; aData = null; }
public AMActionMaterial(AMKey key, int frameRate, Material mat, string prop) : base(key, frameRate) { mMat = mat; mPropId = Shader.PropertyToID(prop); }
public AMActionMaterialPropName(AMKey key, int frameRate, Material mat, string prop) : base(key, frameRate) { mMat = mat; mProp = prop; }
public AMActionTransLocalRot(AMKey key, int frameRate, Transform target, Quaternion rot) : base(key, frameRate) { mTrans = target; mRot = rot; }
public AMActionTransLocalRotEuler(AMKey key, int frameRate, Transform target, Vector3 rot) : base(key, frameRate) { mTrans = target; mRot = rot; }
public AMActionTransLocalPos(AMKey key, int frameRate, Transform target, Vector3 pos) : base(key, frameRate) { mTrans = target; mPos = pos; }
public static bool showEasePicker(AMTrack track, AMKey key, AnimatorData aData, float x = -1f, float y = -1f, float width = -1f) { bool didUpdate = false; if(x >= 0f && y >= 0f && width >= 0f) { width--; float height = 22f; Rect rectLabel = new Rect(x, y - 1f, 40f, height); GUI.Label(rectLabel, "Ease"); Rect rectPopup = new Rect(rectLabel.x + rectLabel.width + 2f, y + 3f, width - rectLabel.width - width_button_delete - 3f, height); int nease = EditorGUI.Popup(rectPopup, key.easeType, easeTypeNames); if(key.easeType != nease) { recordUndoTrackAndKeys(track, false, "Change Ease"); key.setEaseType(nease); // update cache when modifying varaibles track.updateCache(); AMCodeView.refresh(); // preview new position aData.getCurrentTake().previewFrame(aData.getCurrentTake().selectedFrame); // save data EditorUtility.SetDirty(track); setDirtyKeys(track); // refresh component didUpdate = true; // refresh values AMEasePicker.refreshValues(); } Rect rectButton = new Rect(width - width_button_delete + 1f, y, width_button_delete, width_button_delete); if(GUI.Button(rectButton, getSkinTextureStyleState("popup").background, GUI.skin.GetStyle("ButtonImage"))) { AMEasePicker.setValues(/*aData,*/key, track); EditorWindow.GetWindow(typeof(AMEasePicker)); } //display specific variable for certain tweens //TODO: only show this for specific tweens if(!key.hasCustomEase()) { y += rectButton.height + 4; Rect rectAmp = new Rect(x, y, 200f, height); key.amplitude = EditorGUI.FloatField(rectAmp, "Amplitude", key.amplitude); y += rectAmp.height + 4; Rect rectPer = new Rect(x, y, 200f, height); key.period = EditorGUI.FloatField(rectPer, "Period", key.period); } } else { GUILayout.BeginHorizontal(); GUILayout.BeginVertical(); GUILayout.Space(1f); GUILayout.Label("Ease"); GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.Space(3f); int nease = EditorGUILayout.Popup(key.easeType, easeTypeNames); if(key.easeType != nease) { recordUndoTrackAndKeys(track, false, "Change Ease"); key.setEaseType(nease); // update cache when modifying varaibles track.updateCache(); AMCodeView.refresh(); // preview new position aData.getCurrentTake().previewFrame(aData.getCurrentTake().selectedFrame); // save data EditorUtility.SetDirty(track); setDirtyKeys(track); // refresh component didUpdate = true; // refresh values AMEasePicker.refreshValues(); } GUILayout.EndVertical(); if(GUILayout.Button(getSkinTextureStyleState("popup").background, GUI.skin.GetStyle("ButtonImage"), GUILayout.Width(width_button_delete), GUILayout.Height(width_button_delete))) { AMEasePicker.setValues(/*aData,*/key, track); EditorWindow.GetWindow(typeof(AMEasePicker)); } GUILayout.Space(1f); GUILayout.EndHorizontal(); //display specific variable for certain tweens //TODO: only show this for specific tweens if(!key.hasCustomEase()) { key.amplitude = EditorGUILayout.FloatField("Amplitude", key.amplitude); key.period = EditorGUILayout.FloatField("Period", key.period); } } return didUpdate; }