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

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

201. MovieClip is not a constructor [ 57%]

...Laya.Sprite; import MovieClip=Laya.MovieClip; export class SpriteSheetTest extends Sprite{ constructor() { super(); let mc:MovieClip=new MovieClip(); } } 就这点代码,运行后就报错 2017-07-19 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被...

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

202. 使用3D UI · LayaAir3.3 · 引擎文档 · LAYABOX [ 57%]

...nerated"; import { Main } from "./Main"; @regClass() export class BloodBar extends BloodBarBase { onAwake(): void { this.bar.value = 1; this.value.visible = false; Laya.stage.on(Laya.Event.CLICK, this, this.onHurt); } onHurt(): void { this.bar.value = this.bar.value - 0.9; this.value.y = 35; this.va...

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

203. 预制体模块 · LayaAir3文档 · LAYABOX [ 57%]

...: const { regClass, property } = Laya; @regClass() export class ScriptA extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (r...

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

204. 在Unity中设置动画事件(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 57%]

...这里是随便取的名。 ```typescript export default class SceneScript extends Laya.Script3D { //用于表现的方法 public showMsgFunc; constructor(){ super(); } //对应unity添加的AnimationEvent的动画事件函数,名字是可以对应上的 ShowMsg(){ console.log("ShowMsg"); this.sho...

来源: Laya2.0_文档 发布时间: 20210715

205. 已经在vs上引用相关的类,编译后bundle.js却没有相关的代码 [ 57%]

...然后在其他类里面继承。并导包。export default class xxxx extends SDispatcher{},在vs里面没有发现报错。进行指令编译后,运行bundle.js。却提示Uncaught ReferenceError: SDispatcher is not defined. 我也尝试过 去掉 default ,都一样 2020-08-17 添加评...

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

206. 多重遮罩显示异常 [ 57%]

...一部分或者消失,测试代码如下 export default class ClipView extends Laya.Sprite { constructor() { super(); this.init(); } init() { let bg = new Laya.Sprite(); bg.graphics.drawRect(0, 0, 500, 500, '#aaa'); this.addChild(bg); this.panel = new Laya.Panel(); this.panel.width = 500; this.pan...

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

207. popup设置了关闭效果后,窗口关闭但遮罩层没有关掉,请问如何处理 [ 57%]

... }   import { ui } from "./ui/layaMaxUI"; export default class ShopDialog extends ui.ShopDialogUI { constructor() { super(); this.popupEffect = Laya.Handler.create(this, this.showEffect); this.closeEffect = Laya.Handler.create(this, this.hideEffect); this.btnClose.on(Laya.Event.CLICK, this, this.cl...

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

208. 内嵌模式创建scene,运行时报找不到json文件 [ 57%]

...ide自动生成的代码。     export module ui { export class HelloUI extends Scene { public static uiView:any ={"type":"Scene","props":{"width":640,"height":1136},"compId":2,"child":[{"type":"Label","props":{"y":64,"x":214.5,"width":211,"text":"label","styleSkin":"comp/label.png","height":67},"...

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

209. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 57%]

...性 官方的2d物理引擎文档都是IDE篇的。   class CollisionBoll extends Laya.Sprite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:l...

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

210. 2.0版本,Particle2D is not a constructor [ 57%]

2.0版本,Particle2D is not a constructor export default class RunMain extends Laya.Sprite{ constructor(){ super(); Laya.loader.load([{url:"res/213.part",type:Laya.Loader.JSON}],Laya.Handler.create(this,this.onAssetsLoaded)); } onAssetsLoaded(){ let pg = Laya.loader.getRes("res/213.part"); let pd...

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