import icons

p1 = 50
p2 = 85
ball1 = icons.Futbol(width=30, height=30, x=100-p2, y=p1)
ball1_points = [(p1, p2), (p2, p1), (p1, 100-p2), (100-p2, p1)]

p1 = 50
p2 = 15
ball2 = icons.Futbol(width=30, height=30, x=100-p2, y=p1)
ball2_points = [(p1, p2), (p2, p1), (p1, 100-p2), (100-p2, p1)]

for i in range(len(ball1_points)):
    with animation(duration=0.8):
        ball1.x = ball1_points[i][0]
        ball1.y = ball1_points[i][1]
        ball2.x = ball2_points[i][0]
        ball2.y = ball2_points[i][1]

Function Example 4

by jamie

Created 5 years, 8 months ago.