-1
为什么只有第一个动画在我的程序中运行良好?图像应该从左向右移动,然后从右向左移动。这只是从左到右发生的。红宝石鞋动画
Shoes.app do
@im = image("D:/image.jpg", left: 0, top: 220, width: 180, height: 230)
@an = animate 20 do
if @im.left < ([email protected])
@im.left += 5
else
@an.stop
end
end
@an2 = animate 20 do
if @im.left <= ([email protected]) and @im.left > 0
@im.left -= 5
else
@an2.stop
end
end
end