Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
기
기말과제
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
김연수
기말과제
Commits
126c95fd
Commit
126c95fd
authored
3 years ago
by
김연수
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
54b31440
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+9
-0
9 additions, 0 deletions
README.md
with
9 additions
and
0 deletions
README.md
+
9
−
0
View file @
126c95fd
...
...
@@ -77,16 +77,25 @@ while go:
clock.tick(20)
```
go가True인 동안 반복합니다.
초당 화면이 몇번이 바뀔지 설정할 수 있는데 1초당 5번 바뀌도록 설정했습니다.
프레임이 너무 높으면 제대로 출력을 못할 수 있으니 주의합니다.
` for event in pygame.event.get(): `
#실시간으로 행동을 받아옵니다. 이는 리스트형태로 저장됩니다.
이유는 한번에 여러가지의 이벤트가 들어올 수 있기 때문입니다.
게임 중간에 발생한 이벤트를 받아서 인덱스로 사용합니다.
` if event.type == pygame.QUIT:`
만일 발생한 이벤트가 pygame.QUIT이라면
` go=False`
go를False로 바꾸어 반복문을 멈춥니다.
```
k+=1
if k%2=0:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment