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

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

1. 鼠标交互-键盘交互 [ 100%]

...按下事件,一直按着某按键则会不断触发 Laya.stage.on(Event.KEY_DOWN, this, onKeyDown); //添加键盘抬起事件 Laya.stage.on(Event.KEY_UP, this, onKeyUp); } /**键盘按下处理*/ function onKeyDown(e) { keyDownList[e["keyCode"]] = true; } /**键盘抬起处理*/ function onKeyUp(e...

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

2. 缓动-时间线 [ 95%]

...); function setup() { createApe(); createTimerLine(); Laya.stage.on( Event.KEY_DOWN, this, this.keyDown); } function createApe() { target = new Sprite(); target.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(target); target.pivot(55, 72); target.pos(100,100); } function createTimerLine...

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

3. 射线检测-碰撞器混合 [ 80%]

...ddComponent(Laya.Rigidbody); //添加键盘事件 Laya.stage.on(Laya.Event.KEY_DOWN, this, onKeyDown); this.collider = this.scene.getChildByName("Collider"); this.collider.active = false; //是否开启debug模式 Laya.stage.on(Laya.Event.MOUSE_UP, this, drawCollider); } function onKeyDown(e) { if (...

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