예제 #1
0
def applenoise():
    speakerPlayNote(800, 0.3)
    time.sleep(
        0.1
    )  # THIS SLEEP IS ONLY HERE BECAUSE OF BROKEN SPEAKER, WE CAN SWITCH AFTER
    speakerPlayNote(1000, 0.3)
    time.sleep(0.1)
예제 #2
0
def deathnoise():
    speakerPlayNote(300, 0.3)
    time.sleep(0.3)
    speakerPlayNote(200, 0.3)
    time.sleep(0.3)
    speakerPlayNote(100, 0.3)
    time.sleep(0.3)
예제 #3
0
파일: Snake_9.py 프로젝트: GreyOwul/School
def applenoise():                #The noise that will play when a player picks up an apple
    speakerPlayNote(4,800, 0.2)
    speakerPlayNote(4,1000, 0.2)
예제 #4
0
파일: Snake_9.py 프로젝트: GreyOwul/School
#        print("down")
        return 'D'
    if Y < X and Y < (-1) * X:
#        print(X, Y)
#        print("left")
        return 'L'


def applenoise():                #The noise that will play when a player picks up an apple
    speakerPlayNote(4,800, 0.2)
    speakerPlayNote(4,1000, 0.2)



def deathnoise()                 #The noise that will player when a player dies
    speakerPlayNote(4,300, 0.3)
    speakerPlayNote(4,200, 0.3)
    speakerPlayNote(4,100, 0.7)


def buttonpress():              #This function checks to see if the button has pressed
    b = arduinoDigitalRead(2)
    return b


def clear():                    #This function clears the screen
    X, Y = 750, 750
    Size = (X, Y)

    display_surface = pygame.display.set_mode(Size)
    pygame.display.update()
예제 #5
0
def deathnoise():
    speakerPlayNote(4, 300, 0.3)
    speakerPlayNote(4, 200, 0.3)
    speakerPlayNote(4, 100, 0.7)
예제 #6
0
def applenoise():
    speakerPlayNote(4, 800, 0.2)
    speakerPlayNote(4, 1000, 0.2)
예제 #7
0
def deathnoise():  #The noise that will player when a player dies
    speakerPlayNote(4, 300, 0.3)
    speakerPlayNote(4, 200, 0.3)
    speakerPlayNote(4, 100, 0.7)