public override void Clone(ClipAction obj) { base.Clone(obj); ActiveObjAction action = obj as ActiveObjAction; if (action != null) { ActiveObjOperation = action.ActiveObjOperation; OperationObj = action.OperationObj; } }
public List <ClipAction> GetAllAction() { if (Actions == null) { Actions = new List <ClipAction>(); } Actions.Clear(); if (RotateActions != null && RotateActions.Count > 0) { for (int i = 0; i < RotateActions.Count; i++) { ClipAction action = RotateActions[i]; if (action == null) { RotateActions.RemoveAt(i); i--; continue; } Actions.Add(action); } } if (MoveActions != null && MoveActions.Count > 0) { for (int i = 0; i < MoveActions.Count; i++) { ClipAction action = MoveActions[i]; if (action == null) { MoveActions.RemoveAt(i); i--; continue; } Actions.Add(action); } } if (ScaleActions != null && ScaleActions.Count > 0) { for (int i = 0; i < ScaleActions.Count; i++) { ClipAction action = ScaleActions[i]; if (action == null) { ScaleActions.RemoveAt(i); i--; continue; } Actions.Add(action); } } if (UITweenPositionActions != null && UITweenPositionActions.Count > 0) { for (int i = 0; i < UITweenPositionActions.Count; i++) { ClipAction action = UITweenPositionActions[i]; if (action == null) { UITweenPositionActions.RemoveAt(i); i--; continue; } Actions.Add(action); } } if (UITweenRotationActions != null && UITweenRotationActions.Count > 0) { for (int i = 0; i < UITweenRotationActions.Count; i++) { ClipAction action = UITweenRotationActions[i]; if (action == null) { UITweenRotationActions.RemoveAt(i); i--; continue; } Actions.Add(action); } } if (UITweenScaleActions != null && UITweenScaleActions.Count > 0) { for (int i = 0; i < UITweenScaleActions.Count; i++) { ClipAction action = UITweenScaleActions[i]; if (action == null) { UITweenScaleActions.RemoveAt(i); i--; continue; } Actions.Add(action); } } if (ActiveObjActions != null && ActiveObjActions.Count > 0) { for (int i = 0; i < ActiveObjActions.Count; i++) { ActiveObjAction action = ActiveObjActions[i]; if (action == null) { ActiveObjActions.RemoveAt(i); i--; continue; } Actions.Add(action); } } if (PlayEffectActions != null && PlayEffectActions.Count > 0) { for (int i = 0; i < PlayEffectActions.Count; i++) { PlayEffectAction action = PlayEffectActions[i]; if (action == null) { PlayEffectActions.RemoveAt(i); i--; continue; } Actions.Add(action); } } if (PlayAnimActions != null && PlayAnimActions.Count > 0) { for (int i = 0; i < PlayAnimActions.Count; i++) { PlayAnimAction action = PlayAnimActions[i]; if (action == null) { PlayAnimActions.RemoveAt(i); i--; continue; } Actions.Add(action); } } if (PlaySoundActions != null && PlaySoundActions.Count > 0) { for (int i = 0; i < PlaySoundActions.Count; i++) { PlaySoundAction action = PlaySoundActions[i]; if (action == null) { PlaySoundActions.RemoveAt(i); i--; continue; } Actions.Add(action); } } return(Actions); }
public ClipAction GetAction(string actionName) { if (string.IsNullOrEmpty(actionName)) { Utility.LogError("GetAction error caused by null action name"); return(null); } for (int i = 0; i < MoveActions.Count; i++) { ClipAction action = MoveActions[i]; if (action == null) { continue; } if (action.IdentifyName == actionName) { return(action); } } for (int i = 0; i < RotateActions.Count; i++) { ClipAction action = RotateActions[i]; if (action == null) { continue; } if (action.IdentifyName == actionName) { return(action); } } for (int i = 0; i < ScaleActions.Count; i++) { ClipAction action = ScaleActions[i]; if (action == null) { continue; } if (action.IdentifyName == actionName) { return(action); } } for (int i = 0; i < UITweenPositionActions.Count; i++) { ClipAction action = UITweenPositionActions[i]; if (action == null) { continue; } if (action.IdentifyName == actionName) { return(action); } } for (int i = 0; i < UITweenRotationActions.Count; i++) { ClipAction action = UITweenRotationActions[i]; if (action == null) { continue; } if (action.IdentifyName == actionName) { return(action); } } for (int i = 0; i < UITweenScaleActions.Count; i++) { ClipAction action = UITweenScaleActions[i]; if (action == null) { continue; } if (action.IdentifyName == actionName) { return(action); } } for (int i = 0; i < ActiveObjActions.Count; i++) { ActiveObjAction action = ActiveObjActions[i]; if (action == null) { continue; } if (action.IdentifyName == actionName) { return(action); } } for (int i = 0; i < PlayEffectActions.Count; i++) { PlayEffectAction action = PlayEffectActions[i]; if (action == null) { continue; } if (action.IdentifyName == actionName) { return(action); } } for (int i = 0; i < PlayAnimActions.Count; i++) { PlayAnimAction action = PlayAnimActions[i]; if (action == null) { continue; } if (action.IdentifyName == actionName) { return(action); } } for (int i = 0; i < PlaySoundActions.Count; i++) { PlaySoundAction action = PlaySoundActions[i]; if (action == null) { continue; } if (action.IdentifyName == actionName) { return(action); } } return(null); }
public ClipAction AddAction(Type type) { if (type == null) { return(null); } ClipAction action = null; if (type == typeof(MoveAction)) { action = new MoveAction(); MoveActions.Add(action as MoveAction); } else if (type == typeof(RotateAction)) { action = new RotateAction(); RotateActions.Add(action as RotateAction); } else if (type == typeof(ScaleAction)) { action = new ScaleAction(); ScaleActions.Add(action as ScaleAction); } else if (type == typeof(UITweenPositionAction)) { action = new UITweenPositionAction(); UITweenPositionActions.Add(action as UITweenPositionAction); } else if (type == typeof(UITweenRotationAction)) { action = new UITweenRotationAction(); UITweenRotationActions.Add(action as UITweenRotationAction); } else if (type == typeof(UITweenScaleAction)) { action = new UITweenScaleAction(); UITweenScaleActions.Add(action as UITweenScaleAction); } else if (type == typeof(ActiveObjAction)) { action = new ActiveObjAction(); ActiveObjActions.Add(action as ActiveObjAction); } else if (type == typeof(PlayEffectAction)) { action = new PlayEffectAction(); PlayEffectActions.Add(action as PlayEffectAction); } else if (type == typeof(PlayAnimAction)) { action = new PlayAnimAction(); PlayAnimActions.Add(action as PlayAnimAction); } else if (type == typeof(PlaySoundAction)) { action = new PlaySoundAction(); PlaySoundActions.Add(action as PlaySoundAction); } return(action); }