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

大约有 1,171 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0056 秒)

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

...r; var WebGL = Laya.WebGL; function Segment(width, height) { Segment.super(this); Segment.prototype.init = function() { this.graphics.drawRect(-height / 2, -height / 2, width + height, height, "#FF7F50"); } // 获取关节另一头位置 Segment.prototype.getPinPosition = function() { var radian = t...

来源: Laya_示例 发布时间: 20251209

282. UI运行时 · LayaAir3.3 · 引擎文档 · LAYABOX [ 78%]

...件脚本中,使用此场景中已经勾选过的UI组件,直接使用this.即可使用。例如下面的代码: onAwake(): void { // Button添加鼠标事件,让Image不显示 this.Button.on( Laya.Event.MOUSE_DOWN, this, ()=>{ this.Image.visible = false; }); } 运行此场景来看看效...

来源: Laya3.0_文档 发布时间: 20251010

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

...ode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; // 初始化蛇 this.initSnake(); // 监视加速器状态 Accelerator.instance.on(Event.CHANGE, this, this.monitorAccelerator); // 游戏循环 Laya.timer.frameLoop(1, this, this.animate); // 食物生产 Laya.timer.loop(3000, this, this.pr...

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

284. ReferenceError: Loader is not defined 搞不懂引擎原生的也会报这个错? [ 77%]

...每次获取组件带来不必要的性能开销 thi   s._loveControl = this.getComponent(LoveControl);  //点击提示文字,开始游戏 this.label_start.on(Laya.Event.CLICK, this, this.onTipClick); //this._loveControl.startGame();  //点击重置按钮,重新开始 this.button_reset.on(Lay...

来源: Laya_社区 发布时间: 20190704

285. radioGroup设置labels后,每个radio的icon皮肤无法显示了 [ 77%]

...p();          dialog.btn_question_dialog_next.on(Laya.Event.CLICK, this, onNext); dialog.radioGroup_question.labels = "如果资源未加载,则先加载资源,\n加载完成后应用于此对象。,"+"如果资源未加载,则先加载资源,\n加载完成后应用于此对象。,"+...

来源: Laya_社区 发布时间: 20180718

286. 新手引导在ios浏览器表现异常 [ 77%]

...  constructor()          {             Laya3D.init(this.width, this.height);             Laya.stage.setScreenSize(this.width, this.height);             Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO;             Laya.stage.screenMode...

来源: Laya_社区 发布时间: 20200119

287. 【经验】window.focus is not a function [ 77%]

...支持async、await编译经验分享 调用动画结束on方法,报错this.zombieAnimator.on is not a function laya加载unity插件导出的场景 physics3D is not a function 官方视频教程中飞机大战 "this.addChild is not a function" 打地鼠发布成微信小游戏后提示gameThirdSc...

来源: Laya_社区 发布时间: 20180105

288. "img.viewport is not a function" [ 77%]

...序报错window.focus is not a function 调用动画结束on方法,报错this.zombieAnimator.on is not a function laya加载unity插件导出的场景 physics3D is not a function 用微信开发者调试的时候出现document.createTextNode is not a function api readFile success callback function...

来源: Laya_社区 发布时间: 20170428

289. 版本号:2.0.2 beta, 在sound文件夹下音乐播放不了,放入到res文件夹下可播放 [ 77%]

...nd {  //声明一个信息文本 private txtInfo: Text;  constructor() { this.setup(); }  private setup(): void { var gap: number = 10;  //创建一个Sprite充当音效播放按钮 var soundButton: Sprite = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width...

来源: Laya_社区 发布时间: 20190421

290. 关于多点触控e.touches问题 [ 77%]

关于多点触控e.touches问题 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, onCtrlMoveRockerTouchDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, onCtrlMoveRockerTouchDown);     function onCtrlMoveRockerTouchDown(e) {    console.log("onCtrlMoveRockerTouchDown()");    this.ctrlMoveRockerPosX...

来源: Laya_社区 发布时间: 20171204