02. [Pygame] screen 생성하기
Pygame에서는 스크린을 생성하여 스크린을 통해 사용자의 입력을 받고 결과를 내보냅니다. 입력을 받는 방법에는 마우스 입력, 키보드 입력 등이 있습니다. 이 글에서는 사용자의 입력들을 받기 위한 스크린을 생성해보도록 하겠습니다. 먼저 코드는 아래와 같습니다. 더보기 import pygame pygame.init() pygame.display.set_caption('blog') screen = pygame.display.set_mode((512, 384)) clock = pygame.time.Clock() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() screen.fill((255,255,25..
Python/Pygame
2020. 1. 3. 19:06