pong - grafika ship
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import pgzrun
|
||||
from random import randint
|
||||
|
||||
# Start programu
|
||||
WIDTH = 1000
|
||||
HEIGHT = 676
|
||||
@@ -9,6 +11,8 @@ sprite = Actor("ball.png")
|
||||
ship = Actor("ship.png")
|
||||
sprite.x = WIDTH//2
|
||||
sprite.y = HEIGHT//2
|
||||
ship.x = randint(20,WIDTH-20)
|
||||
ship.y = randint(20,HEIGHT-20)
|
||||
|
||||
# Najważniejsze funkcje sterujące
|
||||
def update():
|
||||
@@ -33,6 +37,7 @@ def update():
|
||||
|
||||
def draw():
|
||||
screen.blit("tomulus64.jpg", (0,0) )
|
||||
ship.draw()
|
||||
sprite.draw()
|
||||
|
||||
pgzrun.go()
|
||||
Reference in New Issue
Block a user