public override void Clone(ClipAction obj)
        {
            base.Clone(obj);
            UITweenPositionAction action = obj as UITweenPositionAction;

            if (action != null)
            {
                Reset   = action.Reset;
                Tweener = action.Tweener;
            }
        }
Ejemplo 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);
        }