Commits

Benoît Allard committed 084a529

Draw a cross for the distance probe

Comments (0)

Files changed (1)

         if (result) { this.context.fill(); }
         this.context.restore();
     };
+    this.drawCross = function(x, y){
+        this.context.save();
+        this.context.translate(x, y);
+        this.context.strokeStyle = 'black';
+        this.context.fillStyle = 'black';
+        this.context.lineWidth = .05;
+        this.context.beginPath();
+        this.context.moveTo(-.3, -.3);
+        this.context.lineTo(.3, .3);
+        this.context.moveTo(.3, -.3);
+        this.context.lineTo(-.3, .3);
+        this.context.stroke();
+        this.context.restore();
+    };
 
 }
 
             this.initialised = true;
             this.counter = 0;
         } else {
-            harvester.drawProbe(this.x0, this.y0, true);
+            harvester.drawCross(this.x0, this.y0);
             this.counter += 1;
             if ((this.counter % 5) == 0){
                 this.counter = 0;