7.2 배우들의 움직임과 총알 공격 구현하기
def move_player():
if keyboard.right:
player.x += 5
if keyboard.left:
player.x -= 5
if keyboard.up:
player.y -= 5
if keyboard.down:
player.y += 5
if player.right > WIDTH:
player.right = WIDTH
if player.left < 0:
player.left = 0
if player.bottom > HEIGHT:
player.bottom = HEIGHT
if player.top < 0:
player.top = 0
Last updated