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

大约有 4,111 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0102 秒)

991. sprite添加texture后,sprite无法触发点击事件? [ 88%]

sprite添加texture后,sprite无法触发点击事件? this.item.graphics.drawTexture(Laya.loader.getRes(IMG_RES[this.name])); Laya.stage.addChild(this.item);  this.item.on(Laya.Event.CLICK, this, () => { this.item.destroy(); }); 2017-08-26 添加评论 免费帖 --> 分享 微博 QZONE 微...

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

992. 关于customRender函数不执行的问题 [ 88%]

...于customRender函数不执行的问题 // 保证customRender必定执行 this.frameLoop(1, this, () => { this.graphics.clear(); this.graphics.drawLine(0, 0, 1, 0, '#000'); }); this.customRenderEnable = true; this.customRender = (context: Laya.RenderContext, x: number, y: number) => { let webG...

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

993. Warning!,this class[MiniAdpter] already exist: Object {init: } [ 88%]

Warning!,this class[MiniAdpter] already exist: Object {init: } LayaAirIDE 1.7.18Beta任意新建一个微信小游戏2D示例,编译运行,即出现。 2018-04-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 4 个回...

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

994. "Background is not defined"怎么会没定义呢???求救 [ 88%]

...自: Game.jsvar Game = (function(){ (function Game(){ Laya.init(600,800); this.bg = new window.Background(); Laya.stage.addChild(this.bg); })(); })();Background.js var Background = (function(_super){ function Background(){ Background.super(this); this.bg1 = new Laya.Sprite(); this.bg1.loadImage("res...

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

995. 加载学堂3D角色资源,播放动画异常 [ 88%]

...加载学堂3D角色资源,播放动画异常   //创建男角色模型 this.roleMan = new Laya.MeshSprite3D(Laya.Mesh.load("man/hero-mon_1129.lm")); this.roleMan.transform.localScale = new Laya.Vector3(0.01,0.01,0.01); this.roleMan.transform.localPosition = new Laya.Vector3(0,-0.5,-3); this.scen...

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

996. 【求助】怎么在自定义对象进行实例化的时候,给它绑定监听事件 [ 88%]

...w Sprite(); Laya.stage.addChild(foodSprite); //初始化当前菜品下标 this.index = 0; //数据数组 foodArray = ; foodArray.push(new Food("菜品1", "1", 0)); foodArray.push(new Food("菜品2", "2", 1)); foodArray.push(new Food("菜品3", "3", 2)); foodArray.push(new Food("菜品4", "4", 3)); ...

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

997. 自定义shader 在未指定webgl 模式下 setIBVB参数应该如何设置 [ 87%]

... public customRender(context:Laya.RenderContext,x:number,y:number):void{ this.shaderValue.iTime += this.animeValue; let webgl2d = context.ctx instanceof Laya.WebGLContext2D if( webgl2d) (context.ctx as Laya.WebGLContext2D).setIBVB( x, y, this.iBuffer, this.vBuffer, this.iNum,null, WaterFlowShader.sh...

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

998. Warning!,this class[MiniAdpter] already exist: Object {}具体原因 [ 87%]

Warning!,this class[MiniAdpter] already exist: Object {}具体原因 新建一个示例项目,一行代码不写,就有这个提示  版本1.7.17beta   论坛已经有其他朋友提问过   有说不用在意,也有说兼容小游戏,   如果是为了兼容小游戏,这个Warning该...

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

999. 位图字体ide无法注册 [ 87%]

...给ide用。。。我还需要mBitmapFont.loadFont。不需要了吧、。 this.mFontName = "diyFont"; this.mBitmapFont = new Laya.BitmapFont(); //这里不需要扩展名,外部保证fnt与png文件同名 this.mBitmapFont.loadFont("res/bitmapFont/test.fnt",new Laya.Handler(this,onLoaded)); functi...

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

1000. 绘制直线与折线(TypeScript-LayaAir基础篇(TS)-矢量图) [ 87%]

...          Laya.init(500, 300, WebGL);             this.drawSomething();         }           private drawSomething(): void {             this.sp = new Sprite();             Laya.stage.addChild(this.sp);             //...

来源: Laya2.0_文档 发布时间: 20210714