Beispiel #1
0
        public void PlayLightEffects(ILightEffects effects)
        {
            lock (m_Lock)
            {
                Tpm2JinxPacket packet = new Tpm2JinxPacket();

                if (effects.SetsMasterBrightness)
                {
                    MasterBrightness = effects.MasterBrightness;
                }
                if (effects.SetsLeftRightMix)
                {
                    m_LeftRightMix = effects.LeftRightMix;
                }

                packet.MasterBrightness = (byte)MasterBrightness;
                packet.LRMix            = (byte)m_LeftRightMix;

                if (effects.SetsLeftScene)
                {
                    m_LeftScene      = effects.LeftScene;
                    packet.LeftScene = (byte)m_LeftScene;
                }
                if (effects.SetsRightScene)
                {
                    m_RightScene      = effects.RightScene;
                    packet.RightScene = (byte)m_RightScene;
                }

                SendPacketWithRepeat(packet);
            }
        }
Beispiel #2
0
 public void SetElement(ILightEffects element, IProject project)
 {
     m_Project = project;
     if (m_Element != null)
     {
         Actions.ElementChanges.Instance.RemoveListener(m_Element.Id, Update);
     }
     m_Element = element;
     if (m_Element != null)
     {
         ElementId = m_Element.Id;
         Actions.ElementChanges.Instance.AddListener(m_Element.Id, Update);
         this.Text = m_Element.Title;
     }
     UpdateControls();
 }
Beispiel #3
0
 public void VisitLightEffects(ILightEffects lightEffects)
 {
     // Light Effects do not use audio files, no handling required here.
 }
Beispiel #4
0
 public void PlayLightEffects(ILightEffects lightEffectsElement, Action afterPlayed)
 {
     PlayingModule.LightEffectsPlayer.PlayLightEffects(lightEffectsElement);
     afterPlayed();
 }
Beispiel #5
0
 public override void VisitLightEffects(ILightEffects lightEffects)
 {
     throw new NotImplementedException();
 }
Beispiel #6
0
 public void VisitLightEffects(ILightEffects lightEffects)
 {
     // needs not be considered here, because the File Element Searcher is only used
     // by the background sounds element, which can't contain a LightEffects element
 }
Beispiel #7
0
 public void VisitLightEffects(ILightEffects lightEffects)
 { // Not needed, LightEffects don't use files
 }
Beispiel #8
0
 public void VisitLightEffects(ILightEffects lightEffects)
 {
     // not needed? Light Effects don't use references... nothing to check
 }
Beispiel #9
0
 public LightEffectsSetsLeftSceneAction(ILightEffects element, bool val) : base(element, val)
 {
 }
Beispiel #10
0
 public LightEffectsSetsMasterBrightnessAction(ILightEffects element, bool val) : base(element, val)
 {
 }
Beispiel #11
0
 public LightEffectsValueAction(ILightEffects element, T val)
 {
     m_Element  = element;
     m_Value    = val;
     m_OldValue = GetElementValue();
 }
Beispiel #12
0
 public LightEffectsRightSceneAction(ILightEffects element, int val) : base(element, val)
 {
 }
Beispiel #13
0
 public LightEffectsLeftRightMixAction(ILightEffects element, int val) : base(element, val)
 {
 }