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

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

731. 屏幕适配怎样实现铺满全屏,又不被拉伸? [ 63%]

...有UI的Y轴坐标及高度进行调整 Laya.stage.on(Laya.Event.RESIZE, this, this.onResize);  调整方法为,根据IDE里该UI的对齐模式相应调整。比如让UI始终按照预期的顶部对齐、底部对齐 实践方法:重载引擎的resetLayoutY方法   基本思路就是这样...

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

732. 关于spine资源加载以及创建Laya.Templet问题 [ 63%]

... new Laya.Templet(); tm.loadAni("res/imgs.sk"); tm.on(Laya.Event.COMPLETE, this,()=>{       //是不是只能在这里面创建动画,这里创建,那我如何全局使用????????       var skp = this.buildArmature(1);       skp.showSkinByIndex(1); })   我想在外...

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

733. LayaAir开发笔记(1)五十音图连连看 [ 63%]

...true; copyright.pos(20, g_stat_heiht - 35); copyright.on(Laya.Event.CLICK, this, function() { window.location.href = "http://www.coderluan.com"; }); Laya.stage.addChild(copyright); 3.设置积分板和开始菜单 右下弄了个“点击开始游戏”的文本,点击只会游戏开始,这个...

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

734. Laya.loader.create中的progress回调好像不准确? [ 63%]

....create("scenes/LayaScene_yueren/yueren.ls", Laya.Handler.create(this, function () { //complete func console.log("Scene loaded"); isLoaded = true; }), Laya.Handler.create(this, function (pro) { if (debug) console.log("Loading progresss : " + pro); }, null, false), Laya....

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

735. 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

736. ToolTip鼠标悬停的使用 [ 62%]

...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

737. 怎么使用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

738. 为什么会出现报错 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

739. 有没有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

740. 鼠标滚轮滚动事件 [ 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