コード例 #1
0
def monkey_convo():
    while True:
        update_and_flip()
        screen.blit(comms_photo, [300, 200])

        dialogue(' Loud and clear Commander! ', 420, 500, 20)
        dialogue('          (enter)          ', 420, 525, 12)

        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_RETURN:
                screen.fill(black)
                break
コード例 #2
0
def something_nice():
    while True:
        # Monkey
        update_and_flip()
        dialogue(' (1) It has been a pleasure Commander.        ', 243, 600,
                 15)
        dialogue(' (2) I will miss you...                       ', 243, 625,
                 15)

        # Underline selection before running next function.
        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_1:
                while True:
                    update_and_flip()
                    dialogue(' (1) It has been a pleasure Commander.        ',
                             248,
                             600,
                             15,
                             underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    pre_dream_choices_3.pleasure()

            if event.key == pygame.K_2:
                while True:
                    update_and_flip()
                    dialogue(' (2) I will miss you...                       ',
                             248,
                             625,
                             15,
                             underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    pre_dream_choices_3.miss_you()
コード例 #3
0
def commander_convo():
    while True:
        update_and_flip()
        screen.blit(commander, [290, 200])
        dialogue(' Space Monkey! Are you there?  Do you read me?... ', 420,
                 500, 20)
        dialogue('                    (Enter)                       ', 420,
                 525, 12)

        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_RETURN:
                screen.fill(black)
                break
コード例 #4
0
def something_mean():
    while True:
        # Monkey
        update_and_flip()
        dialogue(' (1) I have never liked you.                  ', 243, 600,
                 15)
        dialogue(' (2) I will not miss you...                   ', 243, 625,
                 15)

        # Underline selection before running next function.
        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_1:
                while True:
                    update_and_flip()
                    dialogue(' (1) I have never liked you.                  ',
                             248,
                             600,
                             15,
                             underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    pre_dream_choices_3.never_liked_you()

            if event.key == pygame.K_2:
                while True:
                    update_and_flip()
                    dialogue(' (2) I will not miss you...                    ',
                             248,
                             625,
                             15,
                             underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    pre_dream_choices_3.not_miss_you()
コード例 #5
0
ファイル: pre_dream.py プロジェクト: jamescapps/Space_Monkey
def main():
    while True:
        screen.fill(black)
        screen.blit(commander, [290, 200])
        update_and_flip()

        dialogue(' Space Monkey! Are you there?  Do you read me?... ', 420,
                 500, 20)
        dialogue('                    (Enter)                       ', 420,
                 525, 12)

        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_RETURN:
                screen.fill(black)
                break
    while True:
        update_and_flip()
        screen.blit(comms_photo, [300, 200])
        update_and_flip()

        dialogue(' Loud and clear Commander! ', 420, 500, 20)
        dialogue('          (enter)          ', 420, 525, 12)

        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_RETURN:
                screen.fill(black)
                break

    nice_work()
コード例 #6
0
def explain_logically():
    # Have to start new loop to get rid of underline.
    while True:
        # Monkey
        update_and_flip()
        dialogue(' Look sir, I understand you are my superior...         ', 246, 600, 15)
        dialogue(' But the longer it takes me to get through this        ', 246, 625, 15)
        dialogue(' asteroid field, the longer it takes me to complete    ', 246, 650, 15)
        dialogue(' my mission....                                        ', 246, 675, 15)
        dialogue('                    (enter)                            ', 246, 700, 12)

        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            convinced()
            if event.key == pygame.K_1:
                convinced()
コード例 #7
0
def lie():
    # Commander
    update_and_flip()
    dialogue(' Eh... None at all...                              ', 520, 100, 15)
    dialogue(' It is basically a cold.                           ', 520, 150, 15)
    dialogue(' Now get to it!                                    ', 520, 200, 15)
    dialogue('                                                   ', 520, 250, 15)

    pygame.time.delay(6000)
    dream.dream()
コード例 #8
0
def truth():
    # Commander
    update_and_flip()
    dialogue(' There is a chance you could experience an         ', 520, 100, 15)
    dialogue(' illness when you wake up. But it is not probable  ', 520, 150, 15)
    dialogue(' and you are healthy so you should be fine.        ', 520, 200, 15)
    dialogue(' Now get to it!                                    ', 520, 250, 15)

    pygame.time.delay(6000)
    dream.dream()
コード例 #9
0
def professional():
    # Commander
    update_and_flip()
    dialogue(' Space monkey you are an admirable soldier.        ', 520, 100, 15)
    dialogue(' I respect you in a professional way.              ', 520, 150, 15)
    dialogue(' Now get to it!                                    ', 520, 200, 15)
    dialogue('                                                   ', 520, 250, 15)

    pygame.time.delay(6000)
    dream.dream()
コード例 #10
0
def whats_the_problem():
    # Commander
    dialogue('  Well......                                              ', 510,
             100, 15)
    dialogue('  What is it.....?                                        ', 510,
             150, 15)
    dialogue('                                                          ', 520,
             200, 15)
    dialogue('                                                          ', 520,
             250, 15)
コード例 #11
0
def personal():
    # Commander
    update_and_flip()
    dialogue(' Space monkey I will miss you dearly.              ', 520, 100, 15)
    dialogue(' I... eh.. err.                                    ', 520, 150, 15)
    dialogue(' Now get to it!                                    ', 520, 200, 15)
    dialogue('                                                   ', 520, 250, 15)

    pygame.time.delay(6000)
    dream.dream()
コード例 #12
0
def pleasure():
    while True:
        # Monkey
        update_and_flip()
        dialogue(' Sir, it has been an absolute pleasure           ', 235, 600,
                 15)
        dialogue(' to serve under you. I wish you all              ', 235, 625,
                 15)
        dialogue(' the best.                                       ', 235, 650,
                 15)

        pygame.time.delay(3000)
        good_luck()
        dream.dream()
コード例 #13
0
def winner():
    size = (800, 800)
    screen = pygame.display.set_mode(size)
    black = (0, 0, 0)
    pygame.init()
    while True:
        screen.fill(black)
        update_and_flip()
        dialogue(' Congratulations!               ', 500, 300, 20)
        dialogue(' You have successfully navigated the asteroid field!', 420,
                 400, 15)
        dialogue('                    (Enter)                       ', 420,
                 500, 12)

        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_RETURN:
                # Run next chapter...
                pre_dream.main()
                turtle.mainloop()
コード例 #14
0
def say_yes():
    # Commander
    update_and_flip()
    dialogue(' Great.  You will be asleep for 750 years.  This may '
             , 510, 100, 15)
    dialogue(' be the last time we speak.  I will most likely be   '
             , 510, 150, 15)
    dialogue(' long since dead when you awake.                     '
             , 510, 200, 15)
    dialogue('                                        ', 490, 250, 15)
    dialogue('                                        ', 490, 300, 15)

    while True:
        # Monkey
        update_and_flip()
        dialogue(' (1) Say something nice. ', 243, 600, 15)
        dialogue(' (2) Say something mean. ', 243, 625, 15)

        # Underline selection before running next function.
        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_1:
                while True:
                    update_and_flip()
                    dialogue(' (1) Say something nice. ', 248, 600, 15, underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    pre_dream_choices_2.something_nice()

            if event.key == pygame.K_2:
                while True:
                    update_and_flip()
                    dialogue(' (2) Say something mean. ', 248, 625, 15, underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    pre_dream_choices_2.something_mean()
コード例 #15
0
def monkey_and_commander_convo():
    while True:
        update_and_flip()
        screen.blit(comms_photo, [500, 500])
        screen.blit(commander, [50, 40])
        screen.blit(stars, [60, 350])
        screen.blit(stars, [360, 350])
        screen.blit(stars, [660, 350])

        # Commander
        dialogue(' You are approaching the asteroid belt?', 500, 150, 15)
        dialogue(' Do you remember the Prime Directive?', 490, 200, 15)

        # Monkey
        dialogue(' (1) No ', 243, 600, 15)
        dialogue(' (2) Yes ', 246, 625, 15)
        dialogue(' (3) More Choices ', 286, 650, 15)

        # Underline selection before running next function.
        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_1:
                while True:
                    update_and_flip()
                    dialogue(' (1) No ', 248, 600, 15, underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    asteroid_choices.say_no_1()

            if event.key == pygame.K_2:
                while True:
                    update_and_flip()
                    dialogue(' (2) Yes ', 242, 625, 15, underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    asteroid_choices.say_yes_1()

            if event.key == pygame.K_3:
                while True:
                    update_and_flip()
                    dialogue(' (3) More Choices ',
                             286,
                             650,
                             15,
                             underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    asteroid_choices.say_more_choices_1()
コード例 #16
0
def what_is_death():
    # Commander
    update_and_flip()
    dialogue(' The greatest mystery that no one knows the answer        ', 520, 100, 15)
    dialogue(' to, but everyone will have revealed.  (enter)            ', 520, 150, 15)
    dialogue('                                                          ', 520, 200, 15)
    dialogue('                                                          ', 520, 250, 15)

    event = pygame.event.wait()
    if event.type == pygame.KEYDOWN:
        if event.key == pygame.K_RETURN:
            while True:
                # Monkey
                update_and_flip()
                dialogue(' I am ready commander.                        ', 243, 600, 15)
                dialogue(' Let\'s get to it!                             ', 243, 625, 15)
                dialogue('                                              ', 243, 650, 15)

                pygame.time.delay(1500)
                good_luck()
                dream.dream()
コード例 #17
0
def no_meaning():
    # Commander
    update_and_flip()
    dialogue(' The question of meaning is separate from the         ', 520, 100, 15)
    dialogue(' question of what existence is. So no that is         ', 520, 150, 15)
    dialogue(' not what I am saying. I can comment on existence     ', 520, 200, 15)
    dialogue(' because we share it. Meaning is yours alone. (enter) ', 520, 250, 15)

    event = pygame.event.wait()
    if event.type == pygame.KEYDOWN:
        if event.key == pygame.K_RETURN:
            while True:
                # Monkey
                update_and_flip()
                dialogue(' I am ready commander.                        ', 243, 600, 15)
                dialogue(' Let\'s get this show on the road!             ', 243, 625, 15)
                dialogue('                                              ', 243, 650, 15)

                pygame.time.delay(1500)
                good_luck()
                pygame.time.delay(1500)
                dream.dream()
コード例 #18
0
    def dream_intro():
        while True:
            screen.fill(black)
            update_and_flip()
            dialogue('      T h e  D r e a m               ', 440, 100, 20)
            dialogue(' There will be two windows.          ', 440, 200, 15)
            dialogue(' Make sure they are side by side.    ', 440, 250, 15)
            dialogue(' Use left and right to move.         ', 440, 300, 15)
            dialogue(' Answer the questions.               ', 440, 350, 15)
            dialogue('     (enter)                         ', 440, 500, 15)

            event = pygame.event.wait()
            if event.type == pygame.KEYDOWN:
                if event.key == pygame.K_RETURN:
                    flashing_monkey_moon()
コード例 #19
0
    def dream_one():
        update_and_flip()
        screen.fill(black)
        screen.blit(dream1, (0, 0))
        pygame.time.delay(3000)
        update_and_flip()
        screen.fill(black)
        screen.blit(dream2, (0, 0))
        pygame.time.delay(3000)
        update_and_flip()
        screen.fill(black)
        screen.blit(dream3, (0, 0))
        pygame.time.delay(3000)
        update_and_flip()
        screen.fill(black)
        screen.blit(dream4, (0, 0))
        pygame.time.delay(3000)
        update_and_flip()
        screen.fill(black)
        screen.blit(dream5, (0, 0))
        pygame.time.delay(3000)
        update_and_flip()
        screen.fill(black)
        screen.blit(dream6, (0, 0))
        pygame.time.delay(3000)
        update_and_flip()
        screen.fill(black)
        screen.blit(dream7, (0, 0))
        pygame.time.delay(3000)
        update_and_flip()
        screen.fill(black)

        x = 0
        y = 500
        while x < 700 and y < 700:
            update_and_flip()
            screen.blit(dream1_background, [0, 0])
            x += .75
            y -= .75
            screen.blit(animation_object, (x, y))
            pygame.display.flip()
            update_and_flip()

        screen.fill(black)
        update_and_flip()
        dialogue(' W h o  a r e  y o u ?              ', 500, 200, 20)
        pygame.time.delay(3500)

        screen.fill(black)
        update_and_flip()
        dialogue(' W h o  i s  a n y o n e ?              ', 500, 200, 20)
        pygame.time.delay(3500)

        x = 0
        y = 500
        while x < 700 and y < 700:
            update_and_flip()
            screen.blit(dream2_background, [0, 0])
            x += .75
            y -= .75
            screen.blit(animation_object, (x, y))
            pygame.display.flip()
            update_and_flip()

        level_one.game()
コード例 #20
0
def long_term_effects():
    # Commander
    update_and_flip()
    dialogue(' (1) Lie                                           ', 520, 100,
             15)
    dialogue(' (2) Tell the truth                                ', 520, 150,
             15)
    dialogue('                                                   ', 520, 200,
             15)
    dialogue('                                                   ', 520, 250,
             15)

    # Underline selection before running next function.
    event = pygame.event.wait()
    if event.type == pygame.KEYDOWN:
        if event.key == pygame.K_1:
            while True:
                update_and_flip()
                dialogue(' (1) Lie                                           ',
                         525,
                         100,
                         15,
                         underline=True)
                pygame.display.flip()
                pygame.time.delay(1500)
                pre_dream_choices_5.lie()

        if event.key == pygame.K_2:
            while True:
                update_and_flip()
                dialogue(' (2) Tell the truth                                ',
                         525,
                         150,
                         15,
                         underline=True)
                pygame.display.flip()
                pygame.time.delay(1500)
                pre_dream_choices_5.truth()
コード例 #21
0
def say_more_choices_1():
    # Have to start new loop to get rid of underline.
    while True:
        # Monkey
        update_and_flip()
        dialogue(' (1) The Prime Directive is nonsense.                   ',
                 246, 600, 15)
        dialogue(' (2) You lied about there being bananas in the capsule! ',
                 246, 625, 15)
        dialogue(' (3) We should talk about what happened at the party... ',
                 246, 650, 15)
        dialogue(' (4) Back                                               ',
                 246, 675, 15)

        # Underline selection before running next function.
        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_1:
                while True:
                    update_and_flip()
                    dialogue(
                        ' (1) The Prime Directive is nonsense.                   ',
                        246,
                        600,
                        15,
                        underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    nonsense()

            if event.key == pygame.K_2:
                while True:
                    update_and_flip()
                    dialogue(
                        ' (2) You lied about there being bananas in the capsule! ',
                        246,
                        625,
                        15,
                        underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    bananas()

            if event.key == pygame.K_3:
                while True:
                    update_and_flip()
                    dialogue(
                        ' (3) We should talk about what happened at the party... ',
                        246,
                        650,
                        15,
                        underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    the_party()

            if event.key == pygame.K_4:
                while True:
                    update_and_flip()
                    dialogue(
                        ' (4) Back                                               ',
                        246,
                        675,
                        15,
                        underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    dialogue(
                        '                                                        ',
                        246,
                        675,
                        15,
                        underline=True)
                    # Works but need to adjust text rects in certain areas.
                    if back_counter == 0:
                        monkey_and_commander_convo()
                    if back_counter == 1:
                        say_no_1()
                    if back_counter == 2:
                        say_yes_1()
コード例 #22
0
def miss_me():
    # Commander
    update_and_flip()
    dialogue(' (1) In a professional manner.                     ', 520, 100,
             15)
    dialogue(' (2) In a personal manner.                         ', 520, 150,
             15)
    dialogue('                                                   ', 520, 200,
             15)
    dialogue('                                                   ', 520, 250,
             15)

    # Underline selection before running next function.
    event = pygame.event.wait()
    if event.type == pygame.KEYDOWN:
        if event.key == pygame.K_1:
            while True:
                update_and_flip()
                dialogue(' (1) In a professional manner.                     ',
                         525,
                         100,
                         15,
                         underline=True)
                pygame.display.flip()
                pygame.time.delay(1500)
                pre_dream_choices_5.professional()

        if event.key == pygame.K_2:
            while True:
                update_and_flip()
                dialogue(' (2) In a personal manner.                         ',
                         525,
                         150,
                         15,
                         underline=True)
                pygame.display.flip()
                pygame.time.delay(1500)
                pre_dream_choices_5.personal()
コード例 #23
0
def perceive_time():
    # Commander
    update_and_flip()
    dialogue(' Only in the same way that you may perceive        ', 520, 100,
             15)
    dialogue(' time in a dream. And what really is existence?    ', 520, 150,
             15)
    dialogue(' Other than time in a dream.                       ', 520, 200,
             15)
    dialogue('                                                   ', 520, 250,
             15)

    while True:
        # Monkey
        update_and_flip()
        dialogue(' (1) Are you saying there is no meaning?      ', 243, 600,
                 15)
        dialogue(' (2) Then what is death?                      ', 243, 625,
                 15)
        dialogue('(3) Well let\'s get to it!                   ', 243, 650, 15)

        # Underline selection before running next function.
        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_1:
                while True:
                    update_and_flip()
                    dialogue(' (1) Are you saying there is no meaning?      ',
                             248,
                             600,
                             15,
                             underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    pre_dream_choices_5.no_meaning()

            if event.key == pygame.K_2:
                while True:
                    update_and_flip()
                    dialogue(' (2) Then what is death?                      ',
                             248,
                             625,
                             15,
                             underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    pre_dream_choices_5.what_is_death()

            if event.key == pygame.K_3:
                while True:
                    update_and_flip()
                    dialogue(' (3) Well let\'s get to it!                   ',
                             248,
                             650,
                             15,
                             underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    good_luck()
                    dream.dream()
コード例 #24
0
def afraid_to_die():
    # Commander
    update_and_flip()
    dialogue(' Why would I be afraid of the most natural thing   ', 520, 100,
             15)
    dialogue(' this world has to offer?                          ', 520, 150,
             15)
    dialogue('                                                   ', 520, 200,
             15)
    dialogue('                                                   ', 520, 250,
             15)

    pygame.time.delay(5000)

    while True:
        # Monkey
        update_and_flip()
        dialogue(' I am ready.                                  ', 243, 600,
                 15)
        dialogue(' Let\'s get to it!                            ', 243, 625,
                 15)
        dialogue('                                              ', 243, 650,
                 15)

        pygame.time.delay(1500)
        good_luck()
        dream.dream()
コード例 #25
0
ファイル: level_five.py プロジェクト: jamescapps/Space_Monkey
def ending():
    print('The end')
    while True:
        update_and_flip()
        dialogue('    T h e  E n d            ', 475, 50, 30)
        dialogue('Unfortunately, life support ', 415, 400, 15)        
        dialogue('failed during hibernation...', 413, 450, 15)
        dialogue('Thank you for playing!      ', 445, 550, 20)
        dialogue('All images taken from open source collections.', 410, 600, 10)
        dialogue('If you wish to have an image removed, please let me know.', 410, 625, 10)
        dialogue('By James Capps              ', 460, 650, 15)
        dialogue('jamesjcapps.com             ', 430, 675, 10)
        dialogue('(enter to exit)             ', 475, 750, 20)
        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_RETURN:
                pygame.display.quit()
                pygame.quit()
コード例 #26
0
def say_no():
    # Commander
    update_and_flip()
    dialogue(' Well...                                ', 490, 100, 15)
    dialogue(' What is it....                         ', 490, 150, 15)
    dialogue('                                        ', 490, 200, 15)
    dialogue('                                        ', 490, 250, 15)

    while True:
        # Monkey
        update_and_flip()
        dialogue(' (1) I was just hoping we could chat. ', 243, 600, 15)
        dialogue(' (2) Nothing.. I am ready...          ', 243, 625, 15)

        # Underline selection before running next function.
        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_1:
                while True:
                    update_and_flip()
                    dialogue(' (1) I was just hoping we could chat. ', 248, 600, 15, underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    pre_dream_choices_2.have_a_chat()

            if event.key == pygame.K_2:
                while True:
                    update_and_flip()
                    dialogue(' (2) Nothing.. I am ready...          ', 248, 625, 15, underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    good_luck()
                    dream.dream()
コード例 #27
0
def get_personal():
    while True:
        # Monkey
        update_and_flip()
        dialogue(' (1) Are you afraid to die?                    ', 243, 600,
                 15)
        dialogue(' (2) Will you miss me?                         ', 243, 625,
                 15)
        dialogue(' (3) Nothing.. I am ready...                   ', 243, 650,
                 15)

        # Underline selection before running next function.
        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_1:
                while True:
                    update_and_flip()
                    dialogue(' (1) Are you afraid to die?                    ',
                             248,
                             600,
                             15,
                             underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    pre_dream_choices_4.afraid_to_die()

            if event.key == pygame.K_2:
                while True:
                    update_and_flip()
                    dialogue(' (2) Will you miss me?                         ',
                             248,
                             625,
                             15,
                             underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    pre_dream_choices_4.miss_me()

            if event.key == pygame.K_3:
                while True:
                    update_and_flip()
                    dialogue(' (3) Nothing.. I am ready...                   ',
                             248,
                             650,
                             15,
                             underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    good_luck()
                    dream.dream()
コード例 #28
0
def main():
    x = -200
    y = 0
    while x > -400:
        update_and_flip()
        screen.fill(black)
        screen.blit(brown_monkey, (-300, 0))
        pygame.time.delay(1500)
        update_and_flip()
        screen.fill(black)
        screen.blit(moon, (x, y))
        x -= 25
        y -= 25

    # Flashing dream backgrounds
    update_and_flip()
    screen.fill(black)
    screen.blit(dreamz1, (0, 0))
    pygame.time.delay(3000)
    update_and_flip()
    screen.fill(black)
    screen.blit(dreamz2, (0, 0))
    pygame.time.delay(3000)
    update_and_flip()
    screen.fill(black)
    screen.blit(dreamz3, (0, 0))
    pygame.time.delay(3000)
    update_and_flip()
    screen.fill(black)
    screen.blit(dreamz4, (0, 0))
    pygame.time.delay(3000)
    update_and_flip()
    screen.fill(black)
    screen.blit(dreamz5, (0, 0))
    pygame.time.delay(3000)
    update_and_flip()
    screen.fill(black)
    screen.blit(dreamz6, (0, 0))
    pygame.time.delay(3000)
    update_and_flip()
    screen.fill(black)
    screen.blit(dreamz7, (0, 0))
    pygame.time.delay(3000)
    update_and_flip()
    screen.fill(black)
    screen.blit(dreamz8, (0, 0))

    # Star animation
    x = 0
    y = 500
    while x < 700 and y < 700:
        update_and_flip()
        screen.blit(dreamz8, [0, 0])
        x += .75
        y -= .75
        screen.blit(animation_object, (x, y))
        pygame.display.flip()
        update_and_flip()

    screen.fill(black)
    update_and_flip()
    dialogue(' W h e n  a r e  y o u ?              ', 500, 200, 20)
    pygame.time.delay(3500)

    screen.fill(black)
    update_and_flip()
    dialogue(' W h e n  i s  a n y o n e ?              ', 500, 200, 20)
    pygame.time.delay(3500)
    # Run function to start next level
    level_four.game()
コード例 #29
0
def say_yes_1():
    global back_counter
    back_counter = 2
    # Commander
    update_and_flip()
    dialogue(' You are one sharp monkey. That is why we selected ', 510, 100,
             15)
    dialogue(' you for this mission. Are you ready to enter the   ', 510, 150,
             15)
    dialogue(' asteroid field?                                    ', 510, 200,
             15)

    while True:
        # Monkey
        update_and_flip()
        dialogue(' (1) No ', 243, 600, 15)
        dialogue(' (2) Yes ', 246, 625, 15)
        dialogue('                   ', 286, 650, 15)

        # Underline selection before running next function.
        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_1:
                while True:
                    update_and_flip()
                    dialogue(' (1) No ', 248, 600, 15, underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    whats_the_problem()
                    say_more_choices_1()

            if event.key == pygame.K_2:
                while True:
                    update_and_flip()
                    dialogue(' (2) Yes ', 242, 625, 15, underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    good_luck()
                    pygame.time.delay(3000)
                    # Run function to enter asteroid field without weapons.
                    instructions(False)
コード例 #30
0
def say_no_1():
    global back_counter
    back_counter = 1
    # Commander
    update_and_flip()
    dialogue('The Prime Directive states that you are not allowed', 510, 100,
             15)
    dialogue('to shoot an asteroid. The resulting debris may have', 510, 150,
             15)
    dialogue('negative consequences for other civilizations.     ', 510, 200,
             15)
    dialogue(' Are you ready to enter the asteroid field?          ', 510, 250,
             15)

    while True:
        # Monkey
        update_and_flip()
        dialogue(' (1) No  ', 243, 600, 15)
        dialogue(' (2) Yes ', 243, 625, 15)
        dialogue('                          ', 243, 650, 15)

        # Underline selection before running next function.
        event = pygame.event.wait()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_1:
                while True:
                    update_and_flip()
                    dialogue(' (1) No ', 248, 600, 15, underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)
                    whats_the_problem()
                    back_counter = 2
                    say_more_choices_1()

            if event.key == pygame.K_2:
                while True:
                    update_and_flip()
                    dialogue(' (2) Yes ', 242, 625, 15, underline=True)
                    pygame.display.flip()
                    pygame.time.delay(1500)

                    # Commander
                    update_and_flip()
                    good_luck()
                    pygame.time.delay(3000)
                    # Run function to enter asteroid field without weapons.
                    instructions(False)