void Awake()
 {
     rainbow   = GetComponent <RainbowColorMaterial>();
     particles = GetComponentInChildren <ParticleSystem>();
     if (this.CompareTag("AddKick"))
     {
         _clip = Kick;
         pitch = 1;
     }
     else if (this.CompareTag("AddSnare"))
     {
         _clip = Snare;
         pitch = 1.1f;
     }
     else if (this.CompareTag("AddBass"))
     {
         _clip = Bass;
         pitch = 1.2f;
     }
     else if (this.CompareTag("AddArp1"))
     {
         _clip = Arp1;
         pitch = 1.3f;
     }
     else if (this.CompareTag("AddArp2"))
     {
         _clip = Arp2;
         pitch = 1.4f;
     }
     else if (this.CompareTag("AddLead1"))
     {
         _clip = Lead1;
         pitch = 1.5f;
     }
     else if (this.CompareTag("AddLead2"))
     {
         _clip = Lead2;
         pitch = 1.6f;
     }
 }
예제 #2
0
 void Awake()
 {
     rainbow = GetComponent<RainbowColorMaterial>();
       particles = GetComponentInChildren<ParticleSystem>();
       if (this.CompareTag("AddKick"))
       {
      _clip = Kick;
      pitch = 1;
       }
       else if (this.CompareTag("AddSnare"))
       {
      _clip = Snare;
      pitch = 1.1f;
       }
       else if (this.CompareTag("AddBass"))
       {
      _clip = Bass;
      pitch = 1.2f;
       }
       else if (this.CompareTag("AddArp1"))
       {
      _clip = Arp1;
      pitch = 1.3f;
       }
       else if (this.CompareTag("AddArp2"))
       {
      _clip = Arp2;
      pitch = 1.4f;
       }
       else if (this.CompareTag("AddLead1"))
       {
      _clip = Lead1;
      pitch = 1.5f;
       }
       else if (this.CompareTag("AddLead2"))
       {
      _clip = Lead2;
      pitch = 1.6f;
       }
 }