private createGameScene() {标签:egret,lambda,bt,addEventListener,全局变量,evt,TouchEvent,stage From: https://blog.51cto.com/u_11889343/6044768
let stageW = this.stage.stageWidth;
let stageH = this.stage.stageHeight;
let bt=new egret.Bitmap();
bt.texture=RES.getRes("bg2_jpg");
this.addChild(bt);
bt.width=stageW;
bt.height=stageH;
bt.x=100;
bt.y=500;
this.stage.addEventListener(egret.TouchEvent.TOUCH_BEGIN, (evt:egret.TouchEvent)=>{
console.log(11111)
this._distance.x=evt.$stageX-bt.x;
this._distance.y=evt.$stageY-bt.y;
}, this);
this.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE, this.mouseMove, this);
this.stage.addEventListener(egret.TouchEvent.TOUCH_END, (evt:egret.TouchEvent)=>{
console.log(1114411)
bt.$setAlpha(Math.random());
}, this);