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

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

51. 位图切片组件 · LayaAir3.0文档 · LAYABOX [ 98%]

...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.clip.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); // 位置 this.clip.skin = "atlas/comp/clip_num.png"; // 皮肤 this.clip.interval = 1000; // 切片动画的播放时间间隔1000毫秒 this.clip.clipX...

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

52. (实现手指控制模型的缩放旋转)触控可以识别 但是导入的模型没有根据触控反应 [ 98%]

...or3(0, 1, 0); constructor(){         Laya.alertGlobalError = true; this._upVector3 = new Laya.Vector3(0, 1, 0); //初始化引擎         Laya3D.init(0, 0);         Laya.stage.scaleMode = Laya.Stage.SCALE_FULL;         Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; ...

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

53. 骨骼动画-Spine事件 [ 98%]

...spineRes6/alien.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, this, onError); mFactory.loadAni(mAniPath); } function onError() { trace("error"); } function parseComplete() { //创建模式为1,可以启用换装 mArmature = mFactory.build...

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

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

...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_示例 发布时间: 20241001

55. 请大家帮助优化一下这个抛物线的代码 [ 98%]

... cached:boolean = false; private body:Laya.Sprite; constructor(){ super(); this.init(); } public init():void{ if(!Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); this.body.loadImage("war/ball.png"); this.body.pivot(12,12); } this.addChild(this.body); Laya.timer.frameLoop(1,this,this...

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

56. 射线检测-碰撞器混合 [ 97%]

...发语言、LayaAirIDE让项目开发更高效。Laya3D.init(0, 0, true); this._tempUnitX1 = new Laya.Vector3(0, 0, -0.1); this._tempUnitX2 = new Laya.Vector3(0, 0, 0.1); this._tempUnitX3 = new Laya.Vector3(-0.1, 0, 0); this._tempUnitX4 = new Laya.Vector3(0.1, 0, 0); this.debug = true; Laya.stage.sc...

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

57. 为什么laya的Button渲染逻辑顺序是先渲染,再获取素材切片? [ 97%]

.../** *@private *改变对象的状态。 */ __proto.changeState=function(){ this._stateChanged=false; this.runCallLater(this.changeClips); var index=this._state < this._stateNum ? this._state :this._stateNum-1; this._sources && (this._bitmap.source=this._sources[index]); if (this.label){ t...

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

58. 同步龙骨插槽动画方案 [ 97%]

...ring, handler: Laya.Handler, aniMode: number = 0) {         this._handler = handler;         this.mFactory = new Laya.Templet();         this.mFactory.on(Laya.Event.COMPLETE, thisthis.parseComplete, [aniMode]);         this.mFactory.loadAni(url);   ...

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

59. list ,增加item ,我想在末尾增加,但是每次都给我翻倍的增加,如何解决 [ 97%]

...次都给我翻倍的增加,如何解决 _proto.room_xinxi=function(){ this.roombg=new Laya.Image($mj.Curr_Game_ImagePath + "hall/room_bg.png"); this.roombg.pos(50,150); this.addChild(this.roombg); var button = new Sprite(); button.loadImage($mj.Curr_Game_ImagePath + "hall/room_jiesan.png"); butto...

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

60. 图片像素精准点击问题! [ 97%]

...mage; constructor() { // 鼠标事件 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.onMouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.onMouseUp, [true]); } /** 按钮动画处理 */ private hitTest(t: Laya.Image) { let s = t.s...

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