大约有 465 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0050 秒)
Laya_社区(170) Laya3.0_api(80) Laya2.0_api(74) laya_api(69) Laya_示例(30) Laya2.0_文档(23) Laya2.0_示例(12) Laya3.0_文档(7)
...数,用于背景位置的更新,实现背景滚动效果。 Laya.timer.frameLoop(1, this, this.onLoop) } _proto.onLoop = function(){ //移动 this.x -= 5; this.moveX = Math.abs(this.x); //当背景1向左移动出游戏的显示区域 1600,则将背景1的x轴坐标,向右移动 1600*2. if (th...
来源: Laya_社区 发布时间: 20160722
...本的初始化内容 } onStart(): void { let page: number = 1; Laya.timer.frameLoop(10, this, () => { page += 1; //在定时器中让变量page每次自增1 this.txt.setVar("n", page); //使用setVar方法,让text文本中变量n的值动态改变 }); } } 效果如动图1-6所示: (动图1...
来源: Laya3.0_文档 发布时间: 20230830
...this.animator.crossFade("Run", 0.1); //等待动画播放完成 Laya.timer.frameLoop(1,this,()=>{ //如果当前播放state已经播放完了一次 if(this.animator.getControllerLayer(0).getCurrentPlayState().normalizedTime >= 1){ //回到站立状态 this.animator.crossFade("Stand", 0.1); Lay...
来源: Laya3.0_文档 发布时间: 20230804
... if (this._spriteNum == 0) { Laya.ILaya.timer.frameLoop(3, this, this.animate); this._preFrameTime = Laya.ILaya.Browser.now(); this._frameIndex = 0; this._time = 0; this._inte...
来源: Laya_社区 发布时间: 20220627
...ation: Laya.Vector3 = new Laya.Vector3(0, 0.01, 0); onStart() { Laya.timer.frameLoop(1, this, ()=> { this.cube.transform.rotate(this.rotation, false); }); } } 效果如动图4-4所示: (动图4-4) 4.1.3 3D节点的进阶使用 @property( { type :Laya.Sprite3D } ) //节点类型 public p3d: ...
来源: Laya3.0_文档 发布时间: 20240528