View difference between Paste ID: 7wPKXWw3 and c5e58Tn5
SHOW: | | - or go back to the newest paste.
1
import play
2
import pygame
3
from random import randint, choice
4
5
pygame.mixer_music.load('hello.mp3')
6
pygame.mixer_music.play()
7
play.set_backdrop('light green')
8
hello_txt = play.new_text(words='Catch 30 Eggs!', x=0, y=250)
9
basket = play.new_image(image='basket.png', x=0, y=-200, size=20)
10
result = play.new_text(words='', x=0, y=0, font_size=100)
11
12
score = play.new_text(words='0', x=300, y=250, color='yellow')
13
score.num = 0
14
lives = play.new_text(words='5', x=-300, y=250, color='red')
15
lives.num = 5
16
17
game_end = False
18
19
color = []
20
21
@play.when_program_starts
22
def start():
23
    pass
24
25
@play.repeat_forever
26
async def movement():
27
	pass
28
29
async def spawn_egg():
30
	pass
31
32
@play.repeat_forever
33
async def egg1():
34
    pass
35
36
@play.repeat_forever
37
async def egg2():
38
    pass
39
40
41
@play.repeat_forever
42
async def game_end_check():  
43
	pass
44
45
play.start_program()