Skip to content
Snippets Groups Projects
Commit 126c95fd authored by 김연수's avatar 김연수
Browse files

Update README.md

parent 54b31440
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment