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

大约有 2,033 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0064 秒)

911. 分享:简单聊天室 [ 74%]

...</span><br/>"; // 添加超链接跳转 my_html.on(Event.LINK,this,onLink); // 点击btn1 send_btn.on(Event.CLICK,this,onSendClick); // 点击btn2 send_btn1.on(Event.CLICK,this,onSendClick1); // enter键发送默认字体或输入框内字体 Laya.stage.on(Event.KEY_DOWN,this,onKeyDown);...

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

912. 使用外部引擎播放layaair制作的.ani [ 74%]

...ight * 2); Laya.loader.load('./card/atlas/card.atlas', Laya.Handler.create(this, onLoaded)); function onLoaded() { //创建一个Animation实例 var tl = new Laya.Animation(); //加载动画文件 tl.loadAnimation("./card/card.ani"); //添加到舞台 Laya.stage.addChild(tl); //播放Animation动画...

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

913. 请问特效播放的速率可以自定义吗? [ 74%]

... 2018-04-11 16:27 Laya.loader.load("shadeY.part",Handler.create(this,onParticleLoaded),null,Loader.JSON); private function onParticleLoaded(settings:ParticleSetting):void { settings.minStartSize = 200; settings.minEndSize = 200; settings.maxStartSize = 200; settings.maxEndSize = 200; par =...

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

914. graphics透明度设置详细步骤 [ 74%]

... save;alpha;draw;restore;  比如://画一个半透明屎黄色区域 this.graphics.save(); this.graphics.alpha(0.5); this.graphics.drawRect(-40, -110, 80, 110, "#ffcc00"); this.graphics.restore(); //再画一个红色小半透明区域 this.graphics.save(); this.graphics.alpha(0.7); this.graphi...

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

915. Error: 代码包大小为 5533 kb,上限为 4096 kb,请删除文件后重试? [ 74%]

...in { constructor() { console.log(Laya.Browser.width, Laya.Browser.height); this.current = { x: 0, y: Laya.Browser.height }; // Laya.stage.bgColor = "#3F51B5"; this.sp = new Laya.Sprite(); Laya.stage.addChild(this.sp); } render() { console.log("render"); var l = [ 0, 0, 0, -(Laya.Browser.height >&...

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

916. ts项目 模块问题 [ 74%]

...export default class player extends Laya.Sprite { constructor() { super(); this.pivot(this.width / 2, this.height / 2); this.graphics.drawRect(0, 0, this._size, this._size, this._color); } }   //a文件 import player from './player'; // 程序入口 class GameMain { constructor() { Laya.init(640, 9...

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

917. 2d物理引擎中,onTriggerEnter函数中的contact参数的getHitInfo函数无效 [ 74%]

...来自: contack.getHitInfo = function () { 这一行上面 写 let that = this; 把this保存下来, 然后把 var mainfold = new Physics.I.box2d.b2WorldMainfol(); 改为 var mainfold = new that.box2d.b2WorldMainfol(); 2020-07-10 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折...

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

918. Sprite optimizeScrollRect = true 似乎有问题 [ 74%]

Sprite optimizeScrollRect = true 似乎有问题 this.initMask = function () { this.mask = new Sprite(); this.mask.width = this.width; this.mask.height = this.height; this.mask.scrollRect = new Rectangle(); this.mask.scrollRect.setTo(0, 0, this.width, this.height); this.mask.optimizeScrollRect = tr...

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

919. LayaAir2.0(LayaBox)之小游戏开放域开发 [ 74%]

...test.atlas", "test/1.png", "test/2.png", "test/3.png"],Laya.Handler.create(this,this.onComplete)); } }.bind(this)); }else { Laya.loader.load("res/atlas/test.atlas",Laya.Handler.create(this,this.onComplete)); } ​ } ​ onComplete(): void { //初始化rank排行榜 var rank = new BigRank(); //初始...

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

920. JSON文件加载成功后,怎么解析成Object对象 [ 74%]

...; traceMsg("加载: " + jsonURL); Laya.loader.load(jsonURL, Handler.create(this, readJsonFinish, [jsonURL]), null, Loader.JSON); } private function readJsonFinish(url:String = null):void { traceMsg("readJsonFinish - 加载成功: " + url); // 返回的是 * 类型,要不要先解析成字符串类...

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