예제 #1
0
 private void OnMouseOver()
 {
     if (!active)
     {
         return;
     }
     if (!isDown && Input.GetMouseButton(0))
     {
         sr.sprite = Down;
         isDown    = true;
         GameSystem.PlayAudio(audioClip);
         GameSystem.ShowMessageBox(message, messageDelay, showWaves);
     }
     else if (isDown && Input.GetMouseButtonUp(0))
     {
         sr.sprite = Up;
         isDown    = false;
         if (reciever != null)
         {
             if (reciever.Receive != null)
             {
                 reciever.Receive(index);
             }
         }
     }
 }