loadMoistureAndFertility () {
    let moisture = this.game.make.graphics(0, 0)
    let fertility = this.game.make.graphics(0, 0)
    let x = 0
    let size = 48
    let padding = 4

    for (var i = 0; i <= 100; i++) {
      let moistCol = this.palette.getDampnessColour(i)
      moisture.beginFill(moistCol, 1)
      moisture.drawRoundedRect(x, 0, size, size, 10)
      moisture.endFill()

      let fertCol = this.palette.getFertilityColour(i)
      fertility.beginFill(fertCol, 1)
      fertility.drawRoundedRect(x, 0, size, size, 10)
      fertility.endFill()

      x += size + padding
    }

    let moistureTexture = moisture.generateTexture()
    let fertilityTexture = fertility.generateTexture()

    this.game.cache.addSpriteSheet('moisturesheet', null,
      moistureTexture.baseTexture.source, size, size, 101, 0, padding)
    this.game.cache.addSpriteSheet('fertilitysheet', null,
      fertilityTexture.baseTexture.source, size, size, 101, 0, padding)

    moisture.destroy()
    fertility.destroy()
    moistureTexture.destroy()
    fertilityTexture.destroy()
  }
/**
   * Generates and loads moisture and fertility graphics to game cache 
   * 
   * @memberof GraphicsLoader
   */
Generates and loads moisture and fertility graphics to game cache


Generates and loads moisture and fertility graphics to game cache
loadMoistureAndFertility () {
    let moisture = this.game.make.graphics(0, 0)
    let fertility = this.game.make.graphics(0, 0)
    let x = 0
    let size = 48
    let padding = 4
    for (var i = 0; i <= 100; i++) {
      let moistCol = this.palette.getDampnessColour(i)
      moisture.beginFill(moistCol, 1)
      moisture.drawRoundedRect(x, 0, size, size, 10)
      moisture.endFill()
      let fertCol = this.palette.getFertilityColour(i)
      fertility.beginFill(fertCol, 1)
      fertility.drawRoundedRect(x, 0, size, size, 10)
      fertility.endFill()
      x += size + padding
    }
    let moistureTexture = moisture.generateTexture()
    let fertilityTexture = fertility.generateTexture()
    this.game.cache.addSpriteSheet('moisturesheet', null,
      moistureTexture.baseTexture.source, size, size, 101, 0, padding)
    this.game.cache.addSpriteSheet('fertilitysheet', null,
      fertilityTexture.baseTexture.source, size, size, 101, 0, padding)
    moisture.destroy()
    fertility.destroy()
    moistureTexture.destroy()
    fertilityTexture.destroy()
  }
loadMoistureAndFertility ( ) { let moisture = this . game . make . graphics ( 0 , 0 ) let fertility = this . game . make . graphics ( 0 , 0 ) let x = 0 let size = 48 let padding = 4 for ( var i = 0 ; i <= 100 ; i ++ ) { let moistCol = this . palette . getDampnessColour ( i ) moisture . beginFill ( moistCol , 1 ) moisture . drawRoundedRect ( x , 0 , size , size , 10 ) moisture . endFill ( ) let fertCol = this . palette . getFertilityColour ( i ) fertility . beginFill ( fertCol , 1 ) fertility . drawRoundedRect ( x , 0 , size , size , 10 ) fertility . endFill ( ) x += size + padding } let moistureTexture = moisture . generateTexture ( ) let fertilityTexture = fertility . generateTexture ( ) this . game . cache . addSpriteSheet ( 'moisturesheet' , null , moistureTexture . baseTexture . source , size , size , 101 , 0 , padding ) this . game . cache . addSpriteSheet ( 'fertilitysheet' , null , fertilityTexture . baseTexture . source , size , size , 101 , 0 , padding ) moisture . destroy ( ) fertility . destroy ( ) moistureTexture . destroy ( ) fertilityTexture . destroy ( ) }
Generates and loads moisture and fertility graphics to game cache
Generates and loads moisture and fertility graphics to game cache