Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson1_2
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
281fefa9
authored
Mar 10, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
c6188a1e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
snake.py
备课.py
snake.py
View file @
281fefa9
...
@@ -4,4 +4,4 @@ import pygame
...
@@ -4,4 +4,4 @@ import pygame
pygame
.
init
()
pygame
.
init
()
# 创建一个窗口
# 创建一个窗口
??
screen
=
pygame
.
display
.
set_mode
((
660
,
480
))
\ No newline at end of file
\ No newline at end of file
备课.py
0 → 100644
View file @
281fefa9
# pygame.display.set_mode() #设置窗口大小
# pygame.display.set_mode() #设置窗口大小
screen
=
pygame
.
display
.
set_mode
((
660
,
480
))
#pygame.event.get() #获取pygame产生的事件
#渲染图片
#step1载入 pygame.image.load(img)
#step2绘制 pygame.surface.blit(source,dest) #source图像资源 dest坐标位置
#step3画面刷新 pygame.display.update() #需要放到所有的surface.blit()方法后面
# 列表:中括号
# 元组:小括号,一旦创建,内容不能改变
#
\ No newline at end of file
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