• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 1,155 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0050 秒)

741. image.drawToCanvas方法获取的一直是空的png [ 63%]

....stage.bgColor = "#232628"; Laya.loader.load("res/logo.png",Handler.create(this,onLoaded)); } private function onLoaded():void { img=new Image(); img.skin="res/logo.png"; Laya.stage.addChild(img); Laya.timer.once(500,this,onClick); //Laya.stage.on(Event.CLICK,this,onClick); } private function onClic...

来源: Laya_社区 发布时间: 20170704

742. ToolTip鼠标悬停的使用 [ 63%]

...e.bgColor="#eeffcc"; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { this._testTip=new TestTipsUI();//务必在Laya.init后去new实例,不可直接在全局变量处实例化 //切记,无论何种鼠标提示方式,...

来源: Laya_社区 发布时间: 20161115

743. 怎么使用ttf,版本2.0.2 [ 62%]

... Laya_Aaron 赞同来自: Laya.loader.load("abc.ttf",Laya.Handler.create(thisthis.abc)); demo里没写预加载字体的代码, 先加载字体,然后再在回调方法里 初始化场景 abc():void{         GameConfig.startScene && Laya.Scene.open(GameConfig.startScene);  ...

来源: Laya_社区 发布时间: 20191217

744. 为什么会出现报错 ani not found:ufo1_down [ 62%]

... var Game = (function(){ (function Game(){ // 子弹发射偏移位置表 this.bulletPos = [[0],[-15,15],[-30,0,30],[-45,-15,15,45]]; // 关卡等级 this.level = 0; // 升级等级所需要的成绩数量 this.levelUpScore = 0; // 积分成绩 this.score = 0; // 子弹级别 this.bulletLevel = 0; ...

来源: Laya_社区 发布时间: 20170525

745. 有没有SoundChannel的示例? [ 62%]

...SoundChannel的示例? SoundManager.playSound(_url, _loop, new Handler(this, _fn)); var channel:SoundChannel = new SoundChannel(); SoundManager.addChannel(channel); _btn.on(Event.CLICK, this, soundClick); function soundClick(evt:Event){ alert("channel.isStoped:"+channel.isStoped); if (channel.isSt...

来源: Laya_社区 发布时间: 20170116

746. 鼠标滚轮滚动事件 [ 62%]

...7013用户 自己回答,以遍查找 Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouseRoll); } // 鼠标滚动 private mouseRoll(e: Laya.Event): void { let value: number = e.delta; if (value > 0) {//滚轮滑动增量大于0,向上滚动 } else {//滚轮滑动增量小于0,向下滚动 } con...

来源: Laya_社区 发布时间: 20180411

747. 如何往TiledMap格子内追加精灵 [ 62%]

...99.5, 73); flower.mouseEnabled=true; flower.alpha=1; flower.on(Event.CLICK,this,function() { flower.scaleX=1.1; flower.scaleY=1.1; Laya.timer.once(100, this,function() { flower.scaleX=1; flower.scaleY=1; alert("My Name is Bear" + no); return; }) }); mallLayer._childs[0].addChild(flower); } 2017-01-1...

来源: Laya_社区 发布时间: 20170110

748. List下使用 localToGlobal 获取坐标错误 [ 62%]

List下使用 localToGlobal 获取坐标错误 console.log(this.ui.List.localToGlobal(new Laya.Point(0, 0)));我想获取List下cell的坐标, 但是不管怎么拖动, 打印出来的数值都是一样的,不知道是使用错误还是哪里设置错误 2017-03-29 添加评论 免费帖 --> 分...

来源: Laya_社区 发布时间: 20170329

749. 多个模块之间相互嵌套import,导致运行报错 [ 62%]

...{ public sex: number = 0; public Create(): void {} public Attack(): void { this.emit('attack'); } } Manager.ts public CreateCat(): void { let self = this; let cat = new Cat(); cat.Create(); cat.on('attack', function () { self.Change(); }); this.animals.push(cat); }   2019-02-26 0 2 分享 微博 QZ...

来源: Laya_社区 发布时间: 20190226

750. Laya2.0编译后所有js都自动合并到bundle.js中,导致bundle.js过大,加载速度很慢,bundle.js可以拆分吗 [ 62%]

...ict checking of property initialization in classes. */     // "noImplicitThis": true,                /* Raise error on 'this' expressions with an implied 'any' type. */     // "alwaysStrict": true,                  /* Parse in strict mode and emit "use strict" for each source fi...

来源: Laya_社区 发布时间: 20190408