loadBeaches () {
    let grass = this.game.make.sprite(0, 0, 'grass')
    for (var i = 0; i < 16; i++) {
      let bin = (i >>> 0).toString(2)
      let pad = '0000'
      bin = pad.substring(0, pad.length - bin.length) + bin
      let bmd = this.game.make.bitmapData(128, 128)      
      let mask = this.game.make.sprite(0, 0, bin)
      bmd.alphaMask(grass, mask)
      this.game.cache.addBitmapData('beach' + bin, bmd)            
    }    
  }
/**
   * 
   * Generates and loads beach graphics to game cache
   * 
   * @memberof GraphicsLoader
   */
Generates and loads beach graphics to game cache


Generates and loads beach graphics to game cache
loadBeaches () {
    let grass = this.game.make.sprite(0, 0, 'grass')
    for (var i = 0; i < 16; i++) {
      let bin = (i >>> 0).toString(2)
      let pad = '0000'
      bin = pad.substring(0, pad.length - bin.length) + bin
      let bmd = this.game.make.bitmapData(128, 128)      
      let mask = this.game.make.sprite(0, 0, bin)
      bmd.alphaMask(grass, mask)
      this.game.cache.addBitmapData('beach' + bin, bmd)            
    }    
  }
loadBeaches ( ) { let grass = this . game . make . sprite ( 0 , 0 , 'grass' ) for ( var i = 0 ; i < 16 ; i ++ ) { let bin = ( i >>> 0 ) . toString ( 2 ) let pad = '0000' bin = pad . substring ( 0 , pad . length - bin . length ) + bin let bmd = this . game . make . bitmapData ( 128 , 128 ) let mask = this . game . make . sprite ( 0 , 0 , bin ) bmd . alphaMask ( grass , mask ) this . game . cache . addBitmapData ( 'beach' + bin , bmd ) } }
Generates and loads beach graphics to game cache
Generates and loads beach graphics to game cache