Exemple #1
0
    def mainMenuButtons(click):
        radius = 36
        red = Vector(246, 74)
        yel = Vector(246, 157)
        gre = Vector(246, 240)

        cenToClick = click.copy().subtract(
            red.copy())  # dist between centre of ball and click
        if (cenToClick.length() <= radius):  # check click is in ball
            quit(0)
        cenToClick = click.copy().subtract(
            yel.copy())  # dist between centre of ball and click
        if (cenToClick.length() <= radius):  # check click is in ball
            Master.instructions()
        cenToClick = click.copy().subtract(
            gre.copy())  # dist between centre of ball and click
        if (cenToClick.length() <= radius):  # check click is in ball
            # Master.gameLoop()
            Master.modeSelect()
Exemple #2
0
    def gameMenuButtons(click):
        #Red, yel and green correspond to the position of the buttons displayed during the game
        radius = 20
        red = Vector(30, 40)
        yel = Vector(80, 40)
        gre = Vector(130, 40)

        cenToClick = click.copy().subtract(
            red.copy())  # dist between centre of ball and click
        if (cenToClick.length() <= radius):  # check click is in ball
            quit(0)
        cenToClick = click.copy().subtract(
            yel.copy())  # dist between centre of ball and click
        if (cenToClick.length() <= radius):  # check click is in ball
            Master.instructions()
        cenToClick = click.copy().subtract(
            gre.copy())  # dist between centre of ball and click
        if (cenToClick.length() <= radius):  # check click is in ball
            # Master.gameLoop()
            Master.menu()
Exemple #3
0
def instructions():
    kbd.key_up(next)
    Master.instructions()