equal
deleted
inserted
replaced
85 Rectangle { |
85 Rectangle { |
86 id: leftBat |
86 id: leftBat |
87 color: "Lime" |
87 color: "Lime" |
88 x: 2; width: 20; height: 90 |
88 x: 2; width: 20; height: 90 |
89 y: ball.direction == 'left' ? ball.y - 45 : page.height/2 -45; |
89 y: ball.direction == 'left' ? ball.y - 45 : page.height/2 -45; |
90 Behavior on y { SpringAnimation{ spring: 1; damping: .1; } } |
90 Behavior on y { SpringAnimation{ velocity: 300 } } |
91 } |
91 } |
92 Rectangle { |
92 Rectangle { |
93 id: rightBat |
93 id: rightBat |
94 color: "Lime" |
94 color: "Lime" |
95 x: page.width - 22; width: 20; height: 90 |
95 x: page.width - 22; width: 20; height: 90 |
96 y: ball.direction == 'right' ? ball.y - 45 : page.height/2 -45; |
96 y: ball.direction == 'right' ? ball.y - 45 : page.height/2 -45; |
97 Behavior on y { SpringAnimation{ spring: 1; damping: .1; } } |
97 Behavior on y { SpringAnimation{ velocity: 300 } } |
98 } |
98 } |
99 |
99 |
100 // The rest, to make it look realistic, if neither ever scores... |
100 // The rest, to make it look realistic, if neither ever scores... |
101 Rectangle { color: "Lime"; x: page.width/2-80; y: 0; width: 40; height: 60 } |
101 Rectangle { color: "Lime"; x: page.width/2-80; y: 0; width: 40; height: 60 } |
102 Rectangle { color: "Black"; x: page.width/2-70; y: 10; width: 20; height: 40 } |
102 Rectangle { color: "Black"; x: page.width/2-70; y: 10; width: 20; height: 40 } |