Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson8_diy1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9e1ce0a4
authored
Dec 19, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
76ed86b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
my_game.py
my_game.py
View file @
9e1ce0a4
import
pygame
import
pygame
from
pygame
import
locals
,
display
,
event
,
init
from
pygame
import
locals
,
display
,
init
from
pygame.time
import
Clock
as
TIME
from
pygame.time
import
Clock
as
TIME
from
pygame.image
import
load
from
pygame.image
import
load
from
random
import
choice
from
random
import
choice
...
@@ -32,7 +32,7 @@ rect.x = 1000
...
@@ -32,7 +32,7 @@ rect.x = 1000
rect
.
y
=
500
-
rect
.
height
rect
.
y
=
500
-
rect
.
height
while
True
:
while
True
:
for
event
in
event
.
get
():
for
event
in
pygame
.
event
.
get
():
if
event
.
type
==
locals
.
QUIT
:
if
event
.
type
==
locals
.
QUIT
:
# 接收到退出事件后退出程序
# 接收到退出事件后退出程序
exit
()
exit
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment