Esempio n. 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);
            }
        }
Esempio n. 2
0
 public ShowPropAction()
 {
     propType     = "Arrow";
     translation  = Vector3.Zero;
     rotation     = Quaternion.Identity;
     fadeDuration = 0.3f;
     sequencer    = new ActionSequencer <ShowPropSubAction>();
 }
Esempio n. 3
0
 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);
     }
 }
Esempio n. 4
0
 public Timeline()
 {
     sequencer = new ActionSequencer <TimelineAction>();
 }