Exemplo n.º 1
0
 public override void Clone(ClipAction obj)
 {
     base.Clone(obj);
     if (obj != null)
     {
         if (obj.GetType() == typeof(MoveAction))
         {
             MoveAction action = obj as MoveAction;
             AnimateObj = action.AnimateObj;
             EaseTime   = action.EaseTime;
             EaseType   = action.EaseType;
             HowToReset = action.HowToReset;
             Target     = action.Target;
             Vec3Target = action.Vec3Target;
         }
         else if (obj.GetType() == typeof(ScaleAction))
         {
             ScaleAction action = obj as ScaleAction;
             AnimateObj = action.AnimateObj;
             EaseTime   = action.EaseTime;
             EaseType   = action.EaseType;
             HowToReset = action.HowToReset;
             Target     = action.Target;
             Vec3Target = action.Vec3Target;
         }
         else if (obj.GetType() == typeof(RotateAction))
         {
             RotateAction action = obj as RotateAction;
             AnimateObj = action.AnimateObj;
             EaseTime   = action.EaseTime;
             EaseType   = action.EaseType;
             HowToReset = action.HowToReset;
             Target     = action.Target;
             Vec3Target = action.Vec3Target;
         }
     }
 }
Exemplo n.º 2
0
        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);
        }