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

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

81. IDE-显示IDE创建的界面 [ 71%]

...ndler = Laya.Handler; var Event = Laya.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Event.CLICK, this, onBtnClick); this.btn2.on(Event.CLICK, this, onBtn2Click); function...

来源: Laya_示例 发布时间: 20260929

82. IDE-显示IDE创建的界面 [ 71%]

...ndler = Laya.Handler; var Event = Laya.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Event.CLICK, this, onBtnClick); this.btn2.on(Event.CLICK, this, onBtn2Click); function...

来源: Laya2.0_示例 发布时间: 20200319

83. 新手,如何看懂官方代码? [ 71%]

...this,而不是var lastMouseX = NaN; CameraMoveScript.prototype._update = function (state){...}像这句,prototype是什么,_update 又是什么,这些都可以直接点出来的,但又查不到API,怎么学?还有state这参数又是什么,请问我要在哪查找或者说怎样查...

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

84. 射线BUG [ 71%]

...BUG,下面附上示例,麻烦测试一下,我用的是1.7.1JS版的function MousePickingScene() { MousePickingScene.super(this); this.ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0)); this.point = new Laya.Vector2(); this._outHitInfo = new Laya.RaycastHit(); this.phasor...

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

85. 官方提供的关系链代码执行报错,是不是wx的sharedCanvas不是Laya的canvas导致的问题 [ 71%]

...这是官方提供的代码 微信主域代码: Laya.timer.once(400,this,function():void{ var rankTexture:Texture = new Texture(Browser.window.sharedCanvas); rankTexture.bitmap.alwaysChange = true;//小游戏使用,非常费,每帧刷新 rankSprite2.graphics.drawTexture(rankTexture,5,78,rankTe...

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

86. js飞机大战报错 请大神看看 [ 71%]

...l=null;          this.infoLabel=null; GameInfo.js: var GameInfo = (function (_super) {     function GameInfo() {         GameInfo.super(this);         // this.infoLabel.text = "abc"; 这个也报异常应该是找不到infoLabel         // 注册按钮点击事件 点击后暂...

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

87. 分享:关于自定义场景继承的实现 [ 70%]

...from "../script/base/BaseScene"; import BaseScene=base.BaseScene; var REG: Function = Laya.ClassUtils.regClass; export module ui { export class CustomSceneUI extends BaseScene { public txt_hello:Laya.Label; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("Custo...

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

88. 我在Layasample主类中,检测键盘按下并输出一切正常,可是放到其他类里面则能检测到按键按下,却一直输出undefined [ 69%]

...面则能检测到按键按下,却一直输出undefined var GameStart = (function (_super) {     function GameStart() {         GameStart.super(this);         Laya.stage.on(Laya.Event.KEY_DOWN,LayaSample,Test);     }     function Test(e){         console.log(e.keycode...

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

89. Cannot read property 'toDefault' of undefined报错是什么原因 [ 69%]

...如下:Laya.class(MousePickingScene, "MousePickingScene", Laya.Scene); function MousePickingScene() { MousePickingScene.super(this); this.camera = new Laya.Camera(0,0.1,100); this.addChild(this.camera); this.camera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; this.skyBox = new Laya.SkyBox(); this.ca...

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

90. sprite.drawToCanvas绘制纹理无法释放内存资源 [ 69%]

...LCanvas.as @@ -70,6 +70,7 @@ package laya.webgl.resource { override public function destroy():void { _ctx && _ctx.destroy(); _ctx = null; + super.destroy(); } public function get context():Context {即  WebGL.as 注释掉265,266 WebGLCanvas.as 在 destroy()函数的最后加 super.destroy()...

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