
class MapGrid extends egret.Sprite {
  public bg:egret.Bitmap = new egret.Bitmap()
  public constructor() {
    super();
    this.init()
  }

  private init() {
    this.bg.texture = RES.getRes('grid_jpg')
    this.addChild(this.bg)
    this.touchEnabled = true
    if (Store.isCatcher()) {
      this.alpha = 0 
      this.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchTap, this)
    }
  }

  private onTouchTap() {
    if (Store.isCatcher()) {
      this.parent.showSurroundedGrids(this.x, this.y, this)
    }
  }

  public release() {
  }
}