   unmuteAudio: ->
     @soundController.unmuteAll()
 
-  _addMapLayer: (mapDatabase,mapName) ->
-    mapLayer = new PIXI.DisplayObjectContainer()
-    mapLayer._name = "Map Layer - #{mapName}"
-    @_layers.base.addChild mapLayer
-    @_layers.maps[mapName] = mapLayer
-
-    map = mapDatabase.get(mapName)
-    @_populateMapTileSprites map, mapLayer
-    mapLayer
-
-  _populateMapTileSprites: (map,layer) ->
-    for row in map.tileGrid
-      for tile in row
-        if tile?
-          sprite = @_getMapTileSprite(tile.type)
-          if sprite?
-            sprite.position.set tile.x, tile.y
-            sprite._name = "Sprite #{tile.type}"
-            layer.addChild sprite
-
-  _getMapTileSprite: (n) ->
-    if n?
-      PIXI.Sprite.fromFrame("block-#{n}")
-    else
-      null
-
-
   @create: (a...) -> new @(a...)
 
 module.exports = UIState

PIXI = require "pixi.js"

class UIState
  @Defaults =

      y: 1.0
  
  constructor: ({stage, zoomScale, soundController, aspectScale}) ->
    # @_layers = @_createLayers(stage,zoomScale,aspectScale)
    @_layers = @_createLayers_old(stage,zoomScale,aspectScale)
    @_objectCaches = {}
    @_currentMapName = null
    @drawHitBoxes = false
