Ejemplo n.º 1
0
 public ArcSceneControl(RawAffSceneControl rawAffSceneControl)
 {
     Timing = rawAffSceneControl.Timing;
     if (rawAffSceneControl.Type == "trackhide" && rawAffSceneControl.Params.Count == 0)
     {
         Type = SceneControlType.TrackHide;
     }
     else if (rawAffSceneControl.Type == "trackshow" && rawAffSceneControl.Params.Count == 0)
     {
         Type = SceneControlType.TrackShow;
     }
 }
Ejemplo n.º 2
0
        public IRawAffItem IntoRawItem()
        {
            var item = new RawAffSceneControl()
            {
                Timing = Timing,
                Type   = "unknown",
                Params = new List <IRawAffValue>(),
            };

            if (Type == SceneControlType.TrackHide)
            {
                item.Type = "trackhide";
            }
            else if (Type == SceneControlType.TrackShow)
            {
                item.Type = "trackshow";
            }
            return(item);
        }
Ejemplo n.º 3
0
 public ArcSceneControl(RawAffSceneControl rawAffSceneControl, ArcTimingGroup timingGroup)
 {
     Timing    = rawAffSceneControl.Timing;
     RawType   = rawAffSceneControl.Type;
     RawParams = rawAffSceneControl.Params;
     if (RawType == "trackhide" && RawParams.Count == 0)
     {
         Type = SceneControlType.TrackHide;
     }
     else if (RawType == "trackshow" && RawParams.Count == 0)
     {
         Type = SceneControlType.TrackShow;
     }
     else if (RawType == "hidegroup" && RawParams.Count == 2)
     {
         if ((RawParams[0] is RawAffFloat) && (RawParams[1] is RawAffInt))
         {
             Type   = SceneControlType.HideGroup;
             Enable = (RawParams[1] as RawAffInt).data > 0;
         }
     }
     TimingGroup = timingGroup;
 }
Ejemplo n.º 4
0
        public IRawAffItem IntoRawItem()
        {
            var item = new RawAffSceneControl()
            {
                Timing = Timing,
                Type   = "unknown",
                Params = new List <IRawAffValue>(),
            };

            if (Type == SceneControlType.TrackHide)
            {
                item.Type = "trackhide";
            }
            else if (Type == SceneControlType.TrackShow)
            {
                item.Type = "trackshow";
            }
            else if (Type == SceneControlType.HideGroup)
            {
                item.Type   = "hidegroup";
                item.Params = new List <IRawAffValue> {
                    new RawAffFloat {
                        data = 0
                    },
                    new RawAffInt {
                        data = Enable?1:0
                    },
                };
            }
            else
            {
                item.Type   = RawType;
                item.Params = RawParams;
            }
            return(item);
        }