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

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

1. 事件管理 · LayaAir3.0文档 · LAYABOX [ 100%]

...是事件1.2 事件的分类2. 引擎内置的事件2.1 事件类型 Laya.Event2.2 事件派发 Laya.EventDispatcher2.3 事件处理 Laya.Handler3. 自定义的事件事件管理 1. 认识事件 1.1 什么是事件 事件Event指的是由系统事先设定的、能被对象识别和响应的动作...

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

2. 使用3D精灵 · LayaAir3.0文档 · LAYABOX [ 72%]

...tion; } } /** * 监听鼠标事件 */ onAwake(): void { Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); this.camera = (<Laya.Camera>this.owner); } /** * 监听键盘事件 */ onUpdate(): void { var elapsedTime: number = Laya.t...

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

3. 基础文本 · LayaAir3.0文档 · LAYABOX [ 71%]

...xt.borderColor = "#fa1515"; this.txt.overflow = "scroll"; this.txt.on(Laya.Event.MOUSE_DOWN, this, this.startScrollText); } /* 开始滚动文本 */ startScrollText() { prevX = this.txt.mouseX; prevY = this.txt.mouseY; Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.scrollText); Laya.stage.on(Laya.E...

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

4. TiledMap地图 · LayaAir3.0文档 · LAYABOX [ 54%]

...ale(0,0); //将原地图放大3倍 this.tMap.scale = 3; Laya.stage.on(Laya.Event.RESIZE,this,this.resize); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); this.resize(); } //地图加载完成的回调 private completeHandler(e: any...

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

5. 使用3DUI · LayaAir3.0文档 · LAYABOX [ 50%]

...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.1; this.value.y = 35; this.value.visible = true; Main.instance.animator.play("Stun"); Laya.Tween.to( this.value, { y : -20 }, 500, null,...

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