drawColumnLines() {
    let baseX = this.grid[0][0].x;
    let baseY = this.grid[0][0].y;
    
    // This gets the points for one curve.
    let points = [];
    for (let r = 0; r < this.numRows; r++) {
      points.push(this.grid[r][0].x - this.cellDistanceX/2 - baseX);
      points.push(this.grid[r][0].y - baseY);
    }

    // Draw that curve once for each column.
    let curve = new Phaser.Curves.Spline(points);
    for (let c = 0; c < this.numColumns+1; c++) {
      let graphics = this.scene.add.graphics({
        x: baseX + c * this.cellDistanceX,
        y: baseY
      });
      graphics.setDepth(5);
      graphics.lineStyle(4, 0xA1BFDD,0.4);
      curve.draw(graphics, (this.numRows-1) * 8);
    }
  }
// Draw curves on the scene to separate columns.
Draw curves on the scene to separate columns.
Draw curves on the scene to separate columns .
drawColumnLines() {
    let baseX = this.grid[0][0].x;
    let baseY = this.grid[0][0].y;
    let points = [];
    for (let r = 0; r < this.numRows; r++) {
      points.push(this.grid[r][0].x - this.cellDistanceX/2 - baseX);
      points.push(this.grid[r][0].y - baseY);
    }
    let curve = new Phaser.Curves.Spline(points);
    for (let c = 0; c < this.numColumns+1; c++) {
      let graphics = this.scene.add.graphics({
        x: baseX + c * this.cellDistanceX,
        y: baseY
      });
      graphics.setDepth(5);
      graphics.lineStyle(4, 0xA1BFDD,0.4);
      curve.draw(graphics, (this.numRows-1) * 8);
    }
  }
drawColumnLines ( ) { let baseX = this . grid [ 0 ] [ 0 ] . x ; let baseY = this . grid [ 0 ] [ 0 ] . y ; let points = [ ] ; for ( let r = 0 ; r < this . numRows ; r ++ ) { points . push ( this . grid [ r ] [ 0 ] . x - this . cellDistanceX / 2 - baseX ) ; points . push ( this . grid [ r ] [ 0 ] . y - baseY ) ; } let curve = new Phaser . Curves . Spline ( points ) ; for ( let c = 0 ; c < this . numColumns + 1 ; c ++ ) { let graphics = this . scene . add . graphics ( { x : baseX + c * this . cellDistanceX , y : baseY } ) ; graphics . setDepth ( 5 ) ; graphics . lineStyle ( 4 , 0xA1BFDD , 0.4 ) ; curve . draw ( graphics , ( this . numRows - 1 ) * 8 ) ; } }
Draw curves on the scene to separate columns.
Draw curves on the scene to separate columns .
// This gets the points for one curve. // Draw that curve once for each column.