Exemplo n.º 1
0
 public void Play(Component requester, float fade_in = 0f)
 {
     this.m_Requesters.Add(requester);
     if (requester is IMSMultisampleController)
     {
         this.m_RequesterControllers.Add(requester as IMSMultisampleController);
     }
     if (this.m_State == MSState.FadeIn || this.m_State == MSState.Playing)
     {
         return;
     }
     if (this.m_FirstTimeUse)
     {
         this.m_VolumeMul    = 0f;
         this.m_FirstTimeUse = false;
     }
     this.m_VolumeMulOnStartFade = this.m_VolumeMul;
     this.m_State      = MSState.FadeIn;
     this.m_PlayTime   = Time.time;
     this.m_FadeInTime = fade_in;
     this.m_Playing    = true;
     for (int i = 0; i < this.m_Samples.Count; i++)
     {
         MSSample mssample = this.m_Samples[i];
         if (mssample != null)
         {
             mssample.Play();
         }
     }
 }
Exemplo n.º 2
0
 public void Play(float fade_in = 0f)
 {
     this.m_PlayTime   = Time.time;
     this.m_FadeInTime = fade_in;
     this.m_Playing    = true;
     for (int i = 0; i < this.m_Samples.Count; i++)
     {
         MSSample mssample = this.m_Samples[i];
         if (mssample != null)
         {
             mssample.Play();
         }
     }
 }