在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
private mouseView: Mouse private mouseArray: Array<Array<any>> = new Array<Array<any>>(); public createMouse(){ this.mouseView = new Mouse(); // 定义二维数组 for(var i = 0;i < 3;i++){ this.mouseArray[i] = []; } this.mouseArray.push([]); for(var i = 0;i < 3;i++){ for(var j = 0;j <= 3; j++) { this.mouseArray[i][j] = this.mouseView.createMouse(300*j,300*i); this.addChild(this.mouseArray[i][j]); this.mouseArray[i][j].touchEnabled = true; } } this.mouseArray[0][0].addEventListener(egret.TouchEvent.TOUCH_BEGIN,function(){ this.removeChild(this.mouseArray[0][0]); },this); 」
|
请发表评论