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

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

31. Laya.timer.loop() 报错 Cannot read property 'loop' of null [ 62%]

...st 。 private n:number = 0; private x0:number = 0; private y0:number = 0; constructor(){super();} onEnable():void{ this.x = this.x0; this.y = this.y0; Laya.timer.loop(20, this, this.frameWork); // 每 20 ms 执行一次 } private frameWork():void{ this.y = this.y0 + 10 * (this.n % 3); alert("move "...

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

32. Cannot read property 'rayCast' of undefined [ 60%]

...ayCast' of undefined export default class indexscene extends Laya.Script { constructor(){ super(); this.rotation = new Laya.Vector3(0, 0.01, 0); this.point = new Laya.Vector2(); this.ray = new Laya.Ray(new Laya.Vector3(),new Laya.Vector3()); //1.开启第四个参数 let config3D = new Laya.Config3D...

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

33. 载入场景报错 [ 58%]

...s.Handler; import Loader=laya.net.Loader; // 程序入口 class GameMain { constructor() { Laya.init(600, 400); Laya.stage.scaleMode = Laya.Stage.SCALE_EXACTFIT; Laya.stage.screenMode = Laya.Stage.SCREEN_VERTICAL; Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDD...

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

34. graphics绘制报错 [ 58%]

graphics绘制报错 class Sprite_DisplayImage { constructor() { Laya.init(Laya.Browser.clientWidth, Laya.Browser.clientHeight, Laya.WebGL); const path = "./res/apes/monkey2.png"; Laya.loader.load(path, Laya.Handler.create(this, function() { let tex = Laya.loader.getRes(path); let sp = new Laya.Spr...

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

35. 3D场景跳转到2D场景问题 [ 57%]

..../GameScene'; export default class VictoryScene extends VictorySceneUI {  constructor() { super();   } onAwake(){ let btnOnce=this.getChildByName("btnOnce"); btnOnce.on(Laya.Event.CLICK,this,this.onClick); } onClick(e){ this.removeSelf(); let gameScene=new GameScene(); Laya.stage.addChild(gameScen...

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

36. 2.3.0beta版本,微信真机调用async函数报错 [ 57%]

...是降到es5以后又会其他地方报错: Uncaught TypeError: Class constructor Scene cannot be invoked without 'new'   现在这个问题有办法解决吗? 2019-10-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2...

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

37. HTMLIframeElement加载html网页的问题 [ 57%]

...MLIframeElement = Laya.HTMLIframeElement; class TestUI extends ui.htmlUI { constructor() { super(); var iHtml: HTMLIframeElement = new HTMLIframeElement(); Laya.stage.addChild(iHtml); iHtml.href = "https://www.baidu.com/"; } } // 程序入口 Laya.init(600, 400); Laya.loader.load([{ url: "res/atlas/...

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

38. 使用 addChild 加载界面后,绑定事件报错 [ 56%]

...如下: export default class GameStart extends ui.GameStartUI {     constructor() {         super();          this.btnStart.on(Laya.Event.CLICK, this, this.startGame);     }      startGame(): void {         //Laya.Scene.open("GameView.scene");         ...

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

39. mac的2.0.0 beta3版本场景添加脚本为组件报错 [ 56%]

...个窗口提示:    export default class Start extends Laya.Script { constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,次方法只执行一次 */ onAwake(): void {  }  /** * 第一次执行update之前执行,只会执行一次 */ onS...

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

40. laya加载unity插件导出的场景 physics3D is not a function [ 52%]

...弹脚本。 */ export default class GameUI extends ui.test.TestSceneUI { constructor() { super();       //添加3D场景 Laya.Scene3D.load("res/Conventional/SimpleTown_DemoScene.ls",Laya.Handler.create(this,function(s:Laya.Scene3D):void{ var scene = s; Laya.stage.addChild(scene); //创建摄像...

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