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

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

1. Laya2.0 extends Array 有问题。 [ 100%]

Laya2.0 extends Array 有问题。 新建一个class A 继承array, 写入自己的方法,new A , 无法调用A内自己写入的方法 附件 : --> testarray.zip 2019-03-01 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1...

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

2. 程序蓝图 · LayaAir3.0文档 · LAYABOX [ 96%]

...nst { bpClass } = BP; @bpClass({ name:"TestBluePrint", canInherited: true, extends:"Script" }) export class TestBluePrint extends Laya.Script { } 需要注意的是,只有注册了构造函数,才可以在蓝图编辑器的createNew中创建这个类的实例,如图12-1所示。 const { bpClas...

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

3. Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent [ 96%]

Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent PhysicsCollider这个组件我只添加了一次,当我按住键盘在点击鼠标的时候,就会有这个错误。说我组件重复添加。我不知道,是你们有默认的键盘事件影响的,还是什么问...

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

4. D.TS访问问题 [ 94%]

D.TS访问问题 declare module common_lib{ class ByteArray extends com.tengxun.utils.ByteArray{} class ParserUtil extends com.utlis.ParserUtil{} class MathR extends com.utlis.MathR{} } 我是仿照layaAir.d.ts来写的,这些代码上面还有ByteArray这些类的declare。奇怪的是: declar...

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

5. 扩展脚本问题,麻烦帮看下 [ 93%]

扩展脚本问题,麻烦帮看下  module game { export class testbox extends Laya.Box { constructor(){ super(); console.log(this.getChildByName('btnName')) } } export class testImg extends Laya.Image { constructor(){ super(); console.log(this.getChildByName('name')) console.log(this) } } } 我...

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

6. 定时器 · LayaAir3.0文档 · LAYABOX [ 89%]

...} from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { //60帧后,图片的透明度变为0.5 Laya.timer.frameOnce(60, this, () => { this.Image.alpha = 0.5; }) } } 1.2 定时重复执行 (基于帧率) Laya.timer.frameLoop,定...

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

7. 问一个问题就是你们的每个UI都继承了一个引擎的代码我要写一个UI的基类那不就无法继承了 [ 89%]

...如果是面板本身绑定runtime并没有用,导出的UI类依然还是extends View,依然还是调用不到基类的函数;会报错:“xxx this variable is not defined”;并且在源码中看到“/*no*/this.xxx()”   最头痛的是自己把extends View改为extends自己写的基...

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

8. _calculateCacheRect函数有bug [ 88%]

...pRect;                 tRec.width = tRec.width + CacheStyle.CANVAS_EXTEND_EDGE * 2;                 tRec.height = tRec.height + CacheStyle.CANVAS_EXTEND_EDGE * 2;                 tRec.x = tRec.x - sprite.pivotX;                 tRec.y = tRec.y - sprite.pivotY;     ...

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

9. 继承Scene没有onEnable [ 88%]

...ene.root.addChild(t);     } } //激活启动类 new Main();  class tt extends Laya.Node{     constructor(){         super();     }     public onAwake():void{         console.log(1111);     } }   2.继承Sprite 执行后会有onAwake         let t = new ...

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

10. @regClass编译报错! [ 88%]

...return result;   };    // src/MachineCtrl.ts   var MachineCtrl = class extends CtrlBase {     constructor() {       super();     }   };   __name(MachineCtrl, "MachineCtrl");    // src/funcccccc.ts   var funzzzzz = class {     constructor() {     }     static run(callBack, calle...

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