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

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

1. 鼠标交互-滑动 [ 100%]

...age.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createSprite(); this.drawTrack(); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; const w = 50; const h = 30; this.button = new Sprite(); this.button.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.button.pivot(w ...

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

2. 鼠标交互-鼠标交互 [ 92%]

...is.createLogger(); } createInteractiveTarget() { const Event = Laya.Event, Sprite = Laya.Sprite; let rect = new Sprite(); rect.graphics.drawRect(0, 0, 200, 200, "#D2691E"); rect.size(200, 200); rect.x = (Laya.stage.width - 200) / 2; rect.y = (Laya.stage.height - 200) / 2; Laya.stage.addChild(rect); ...

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

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

...Laya.stage.bgColor = "#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...

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