Beispiel #1
0
    public bool HandleMouseInput(MouseCore clicker)
    {
        if (!PD.usingMouse)
        {
            return(false);
        }
        int selected = -1;

        if (clicker.getPositionInGameObject(playPauseButton).z > 0.0f && clicker.isDown())
        {
            if (isPlaying)
            {
                PD.sounds.PauseMusic();
            }
            else
            {
                PD.sounds.ResumeMusic();
            }
            return(true);
        }
        for (int y = 0; y < playlistShown; y++)
        {
            if (clicker.getPositionInGameObject(playlistColliders[y]).z > 0.0f)
            {
                selected = y; break;
            }
        }
        if (selected < 0)
        {
            return(false);
        }
        cursorIdx = selected;
        if (clicker.isDown())
        {
            if (selected == 0 && playlist.text.StartsWith("..."))
            {
                dy--;
            }
            else if (selected == playlistShown - 1 && playlist.text.EndsWith("..."))
            {
                dy++;
            }
            else
            {
                SetupTrack();
            }
        }
        return(clicker.isDown());
    }
Beispiel #2
0
 public bool ClickingCancelButton(MouseCore clicker)
 {
     if (cancelButton == null)
     {
         return(false);
     }
     if (clicker.getPositionInGameObject(cancelButton).z == 0)
     {
         cancelButton.GetComponent <SpriteRenderer>().sprite = cancelSheet[0];
         return(false);
     }
     else
     {
         cancelButton.GetComponent <SpriteRenderer>().sprite = cancelSheet[1];
         return(clicker.isDown());
     }
 }
Beispiel #3
0
 private bool IsMouseBeingMoved()
 {
     return(clicker.hasMoved() || clicker.isDown());
 }