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

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

51. 如何拓展材质shader? [ 77%]

...  如何在不改laya.d3 这个类下拓展?   我尝试BlinnPhongExt extends Laya.BlinnPhongMaterial   但在做材质属性拷贝的时候会出现不正确的结果   export default class LayaBlinnPhongExt extends Laya.BlinnPhongMaterial {     public CopyAttribute_ASKLaya(baseMat: Laya....

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

52. TiledMap,mapLayer追加精灵无法显示,已参考完已有问题解答,无法解决 [ 77%]

...owGridList不存在,需要在libs/LayaAir.d.ts里,找到class MapLayer extends Sprite这一行,在下面加上一行代码: class MapLayer extends Sprite { _mapData: Array<any>; /** * @private */ _gridSpriteArray: Array<any>; _showGridList: Array<any>; //这行是我新加...

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

53. 2.0按钮添加事件报错 cannot read property 'on' fof undefined [ 77%]

...添加事件报错 cannot read property 'on' fof undefined class GameLogin extends ui.login.login_bgUI { constructor() { super(); this.btn_register.on("click", this, this.ToRegisterPage); } ToRegisterPage() : void { this.loadScene("login/register_page"); } }   //调用on的时候 直接会报Cannot...

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

54. TypeScript语法问题,泛型 [ 77%]

...gle.instance } constructor(){ Single.instance =new Single(); } } class Car extends Single { constructor() { super(); } } var inst = Car.GetInstance<Car>() 2018-06-21 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 …… 相关问...

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

55. ts项目 模块问题 [ 77%]

...未定义,require也用不了   //b文件 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'; // 程序入口 clas...

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

56. 3d项目,需要加一层显示分数的界面 [ 77%]

...的界面,比如我写了A.ui文件,自动生成一个ts类,class A extends ui.AUI,但是这个ui命名空间并不存在,如果我手动改成extends Laya.View(.ui文件里用的View标签),那么我如何让这个类去使用这个.ui文件呢?就像eui里指定skin一样。 2018-0...

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

57. Laya2.4版本,场景为内嵌时layaMaxUI类中没有声明场景中的Button等控件? [ 77%]

...景中的Button等控件? export module ui { export class GameSceneuiUI extends Laya.Scene { public static uiView:any ={"type":"Scene","props":{"width":720,"height":1280},"compId":2,"child":[{"type":"Button","props":{"y":616,"x":296,"skin":"comp/button.png","name":"butStart","label":"label"},"comp...

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

58. 实体组件系统 · LayaAir3.0文档 · LAYABOX [ 77%]

...逻辑及对象池回收机制 */ @regClass() export default class Bullet extends Laya.Script { constructor() { super(); } onEnable(): void { //设置初始速度 let rig: Laya.RigidBody = this.owner.getComponent(Laya.RigidBody); rig.setVelocity({ x: 0, y: -10 }); } onTriggerEnter(other: any, self: ...

来源: Laya3.0_文档 发布时间: 20240528

59. Laya2.4版本,场景为内嵌时layaMaxUI类中没有声明场景中的Button等控件? [ 76%]

...on等控件? export module ui {     export class GameSceneuiUI extends Laya.Scene {         public static  uiView:any ={"type":"Scene","props":{"width":720,"height":1280},"compId":2,"child":[{"type":"Button","props":{"y":616,"x":296,"skin":"comp/button.png","name":"butStart...

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

60. laya3d物体碰撞与触发检测的问题 [ 76%]

...测的问题 import BoxMove from "./BoxMove"; export default class GameUI extends Laya.Scene { constructor() { super(); //加载场景文件 this.loadScene("test/TestScene.scene"); //添加3D场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //添加照相机 var camera = (scene.addChild(ne...

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