Commit ca9e829d authored by Bruno Coudoin's avatar Bruno Coudoin
Browse files

football, no more keep the red line drawn on android

parent 249fbeba
......@@ -97,11 +97,11 @@ ActivityBase {
anchors.fill: parent
touchPoints: [ TouchPoint { id: point1 }]
onReleased: {
line.opacity = 0.0
line.opacity = 0
Activity.startMotion(point1.x - ball.width / 2,
point1.y - ball.height / 2)
}
onPressed: line.opacity = 1
onTouchUpdated: {
var point = ball.mapToItem(border, point1.x, point1.y)
Activity.drawLine(point.x, point.y, ball.x + ball.width/2, ball.y + ball.height/2)
......
......@@ -113,7 +113,6 @@ function drawLine(x1, y1, x2, y2){
items.line.width = Math.sqrt(Math.pow((x1 - x2), 2) + Math.pow((y1- y2), 2));
items.line.x = x2
items.line.y = y2
items.line.opacity = 1.0
}
/* Tux moves up and down, called in initlevel() */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment