반응형 파이겜1 [파이게임.004] 마우스 입력처리 🚩 마우스 움직임과 클릭 감지하기 [1] 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import pygame pygame.init() background = pygame.display.set_mode((480,360)) pygame.display.set_caption('mouse') play = True count = 0 #MOUSEMOTION count while play: for event in pygame.event.get(): if event.type == pygame.QUIT: play = False if event.type == pygame.MOUSEMOTION: #마우스 모션(움직임) 확인 count += 1 print('MOU.. 2022. 6. 13. 이전 1 다음 728x90 반응형