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

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

1. Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent [ 100%]

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

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

2. D.TS访问问题 [ 97%]

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

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

扩展脚本问题,麻烦帮看下  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

4. js继承模式 [ 94%]

...type.init = function() { console.log(this); }; return Class; })(); } var __extends = (this && this.__extends) || function(d, b) { for (var p in b) { (b.hasOwnProperty(p)) && (d[p] = b[p]); } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.pro...

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

5. @regClass编译报错! [ 92%]

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

6. 继承Scene没有onEnable [ 91%]

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

7. event自定义事件的问题 [ 90%]

...Sample类: package { import laya.display.Sprite; public class LayaSample extends Sprite{ public static var event:String = "event"; public function LayaSample() { super(); //初始化引擎 Laya.init(1136, 640); var re:Revent = new Revent(); var de:DisEvent = new DisEvent(); } } } Revent类: pack...

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

8. Laya2.0 extends Array 有问题。 [ 90%]

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

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

9. TS版本编译后JS在HTML中顺序错乱,有最简DEMO! [ 89%]

...个类,内部没有任何实现,继承关系分别为如下: class V extends Laya.Sprite {} class W extends V {} class L extends W {} 编译后的index.html中,引入顺序错误,如下:     <!--jsfile--startTag-->     <script src="js/W.js"></script>     &lt...

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

10. 新手入坑请教下各位大神关于LayaMaxUI问题 [ 88%]

...Laya.ClassUtils.regClass; export module ui.test { export class TestSceneUI extends Laya.Scene {         public scoreLbl:Laya.Label;         public tipLbll:Laya.Label; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("test/TestScene"); } } REG("ui...

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