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

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

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

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

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

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

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

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