       #cursors = @phaser.input.keyboard.createCursorKeys()
       @balls = @phaser.add.group()
       @balls.enableBody = true;
+      
+      @new_line = new Phaser.Line 64, 64, 200, 300
 
     collectBalls: (plateform, ball) ->
       plateform.playerParent.captureBall(ball)
 
     update: () ->
       @phaser.physics.arcade.overlap @plateforms, @balls, @collectBalls, null, this
+      @phaser.physics.arcade.collide @balls, @new_line
 
-      @new_line = new Phaser.Line 64, 64, 200, 300
       @phaser.input.onDown.add(@click, this);
 
-      #@phaser.physics.overlap @balls, @collectStar, null, this
       @generate_fake_balls()
 
       if @dragging
           if @phaser.input.activePointer.isDown
-            @new_line.end.set(@phaser.input.activePointer.x, @phaser.input.activePointer.y)
+            @new_line.end.set @phaser.input.activePointer.x, @phaser.input.activePointer.y
+
           else
             @dragging = false
+            console.log 'push line !'
 
-    click: ->
-      console.log('click');
+    render: () ->
+      @phaser.debug.geom(@new_line);
+      @phaser.debug.rectangle(@new_line);
+
+
+    click: (pointer) ->
+      @dragging = true
+      @new_line.start.set pointer.x, pointer.y
 
 
 

            '',
            preload:( -> self.preload()),
            create: ( -> self.create()),
            update: (-> self.update())
        )



        @scoreText = null

    captureBall: (ball) ->
        ball.kill()
        @score += 10
        @displayScore()
