示例#1
0
        protected Timeline(LoadInfo info)
        {
            info.RebuildList <TimelineInstantAction>(PRE_ACTIONS, preActions);
            info.RebuildList <TimelineInstantAction>(POST_ACTIONS, postActions);

            sequencer = info.GetValue <ActionSequencer <TimelineAction> >(SEQUENCER, null);
            if (sequencer == null)
            {
                sequencer = new ActionSequencer <TimelineAction>();
                //Must load old style list.
                List <TimelineAction> actions = new List <TimelineAction>();
                info.RebuildList <TimelineAction>(ACTIONS, actions);
                foreach (TimelineAction action in actions)
                {
                    sequencer.addAction(action);
                }
            }

            foreach (TimelineInstantAction action in preActions)
            {
                action._setTimeline(this);
            }

            foreach (TimelineInstantAction action in postActions)
            {
                action._setTimeline(this);
            }

            foreach (TimelineAction action in sequencer.Actions)
            {
                action._setTimeline(this);
            }
        }
 public ShowPropAction()
 {
     propType     = "Arrow";
     translation  = Vector3.Zero;
     rotation     = Quaternion.Identity;
     fadeDuration = 0.3f;
     sequencer    = new ActionSequencer <ShowPropSubAction>();
 }
 protected ShowPropAction(LoadInfo info)
     : base(info)
 {
     propType     = info.GetString(PROP_TYPE, "Arrow");
     translation  = info.GetVector3(TRANSLATION, Vector3.Zero);
     rotation     = info.GetQuaternion(ROTATION, Quaternion.Identity);
     fadeDuration = info.GetFloat(FADE_DURATION, 0.3f);
     sequencer    = info.GetValue <ActionSequencer <ShowPropSubAction> >(SEQUENCER, null);
     if (sequencer == null)
     {
         sequencer = new ActionSequencer <ShowPropSubAction>();
     }
     foreach (ShowPropSubAction action in sequencer.Actions)
     {
         action._setShowProp(this);
     }
 }
示例#4
0
 public Timeline()
 {
     sequencer = new ActionSequencer <TimelineAction>();
 }