Ejemplo n.º 1
0
 void Update()
 {
     if (noteOn)
     {
         MaterialPulse pulse = GetComponent <MaterialPulse>();
         if (pulse)
         {
             pulse.Pulse(1.0f);
         }
     }
 }
Ejemplo n.º 2
0
        void OnCollisionEnter2D(Collision2D collision)
        {
            int   note     = GetNote();
            float strength = GetCollisionStrength(collision);

            if (synth)
            {
                synth.NoteOn(note, strength, noteLength);
            }

            MaterialPulse pulse = GetComponent <MaterialPulse>();

            if (pulse)
            {
                pulse.Pulse(strength);
            }
        }