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

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

1. Sprite-新手引导 [ 100%]

...xtStep(); } nextStep() { if (guideStep === guideSteps.length) { Laya.stage.removeChild(guideContainer); Laya.stage.removeChild(tipContainer); return; } let step = guideSteps[guideStep++]; hitArea.unHit.clear(); hitArea.unHit.drawCircle(step.x, step.y, step.radius, "#000000"); interactionArea.graphic...

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

2. 2D物理-桥 [ 77%]

..."; } dispose() { Laya.Laya.stage.offAll(Laya.Event.CLICK); Laya.Laya.stage.removeChild(this.label); } } new Physics_Physics_Bridge();import { Laya } from "Laya"; import { Sprite } from "laya/display/Sprite"; import { Stage } from "laya/display/Stage"; import { Event } from "laya/events/Event"; impor...

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

3. 输入设备-贪吃蛇(重力感应) [ 74%]

...Point(targetPosition.x, targetPosition.y)) { this.addSegment(); Laya.stage.removeChild(food); foods.splice(i, 1); } } } produceFood() { const Sprite = Laya.Sprite; // 最多五个食物同屏 if (foods.length == 5) return; let food = new Sprite(); Laya.stage.addChild(food); foods.push(food); const f...

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

4. 2D物理-复合碰撞器 [ 69%]

...spose() { Laya.Laya.stage.offAll(Laya.Event.DOUBLE_CLICK); Laya.Laya.stage.removeChild(this.label); } } new Physics_Physics_Tumbler(); import { Laya } from "Laya"; import { Sprite } from "laya/display/Sprite"; import { Stage } from "laya/display/Stage"; import { Browser } from "laya/utils/Browser"; ...

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

5. 2D物理-仿生机器人 [ 54%]

...t.CLICK); Laya.Laya.stage.offAll(Laya.Event.DOUBLE_CLICK); Laya.Laya.stage.removeChild(this.label); } } class B2Math { static AddVV(a, b) { return [a[0] + b[0], a[1] + b[1]]; } static SubVV(a, b) { return [a[0] - b[0], a[1] - b[1]]; } } new Physics_Physics_Strandbeests(); import { Config } from "Con...

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

6. 其他引擎的Demo-Example_23 [ 50%]

...Y = laser.alpha; if (laser.alpha < 0.01) { lasers.splice(i, 1); Laya.stage.removeChild(laser); i--; } } } // increment the ticker tick += 1; } } } import laya.display.Sprite; class Laser extends Sprite { public var life:int; }

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