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

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

1. 鼠标交互-Hold [ 100%]

...Script三种开发语言、LayaAirIDE让项目开发更高效。const HOLD_TRIGGER_TIME = 1000, apePath = "res/apes/monkey2.png"; let isApeHold = false; class Interaction_Hold { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Han...

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

2. 计时器-延迟调用 [ 85%]

...ter); } } onCallLater() { const Text = Laya.Text; console.log("onCallLater triggered"); let text = new Text(); text.font = "SimHei"; text.fontSize = 30; text.color = "#FFFFFF"; text.text = "打开控制台可见该函数仅触发了一次"; text.size(Laya.stage.width, Laya.stage.height); text.wordWr...

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

3. 2D物理-碰撞事件与传感器 [ 61%]

...w box2d.b2Vec2(d.x * 100, d.y * 100); bodyB.applyForce(position, F); } } onTriggerExit(colliderB: ColliderBase, colliderA: ColliderBase, contact) { if (colliderA === this.sensorCollider) { let bodyB: RigidBody = colliderB.owner.getComponent(RigidBody); let index = bodyB.getBody().GetUserData().point...

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