|
|
@@ -6,19 +6,24 @@ HEIGHT = 708 |
|
|
|
|
|
|
|
def on_mouse_down(): |
|
|
|
print('Stop!') |
|
|
|
titi.speed = 0 |
|
|
|
titi.speed = 1 |
|
|
|
|
|
|
|
def on_mouse_up(): |
|
|
|
titi.speed = 1 |
|
|
|
blackbird.speed = 1 |
|
|
|
|
|
|
|
def update(): |
|
|
|
titi.x += titi.speed |
|
|
|
blackbird.x += blackbird.speed |
|
|
|
|
|
|
|
def draw(): |
|
|
|
screen.blit('background', (0, 0)) |
|
|
|
titi.draw() |
|
|
|
blackbird.draw() |
|
|
|
|
|
|
|
titi = Actor('bird1', (75, 350)) |
|
|
|
blackbird = Actor('bird2', (95, 150)) |
|
|
|
titi.speed = 1 |
|
|
|
blackbird.speed = 2 |
|
|
|
|
|
|
|
pgzrun.go() |