Computer/Micro:bit
๋น๋ฐฉ์ธ ํผํ๊ธฐ
๋ง์ดํฌ๋ก ๋นํธ๋ฅผ ์ ์ดํ๋ ๊ธฐ๋ณธ ๋ฌธ๋ฒ์ ํ์ตํ์ฌ ๊ฒ์์ ๋ง๋ ๋ค. # ๊ฒ์์
ํ
def gameSetting(): global start, gameSpeed, sprite, direction start = False gameSpeed = 500 sprite = game.create_sprite(2, 4) # sprite๊ฐ ์ฒ์ ๋ฐฐ์น๊ฐ ๋๋ฉด ์ค๋ฅธ์ชฝ์ ๋ฐ๋ผ๋ณด๊ณ ์๋ค. ์ด๊ธฐ ์ธํ
์ ํด์ฃผ๋๊ฒ. direction = "right" rainSetting() # ๊ฒ์์ค๋ฒ ๋ง๋ค๊ธฐ def spriteDie(): global start if sprite.is_touching(rain1) or sprite.is_touching(rain2) or sprite.is_touching(rain3): rain1.delete() rain2..