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

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

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

...is.monitorAccelerator); // 游戏循环 Laya.timer.frameLoop(1, this, this.animate); // 食物生产 Laya.timer.loop(3000, this, this.produceFood); // 游戏开始时有一个食物 this.produceFood(); } initSnake() { const Point = Laya.Point; for (let i = 0; i 0) { let prevSeg = segments[segments.l...

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

2. 加载-销毁Texture使用的图片资源 [ 95%]

...#232628"; Stat.show(); this.init(); } init() { const Sprite = Laya.Sprite, Animation = Laya.Animation, Text = Laya.Text, Event = Laya.Event; // 创建背景 this.spBg = Sprite.fromImage(PathBg); Laya.stage.addChild(this.spBg); // 创建动画 this.aniFly = new Animation(); this.aniFly.loadAtlas(Path...

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