大约有 1,562 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0078 秒)
...:Number; private var txt:TextField; public function Shake_A_Shake() { this.addChild(txt=new TextField); txt.x=10; txt.y=10; txt.autoSize=TextFieldAutoSize.LEFT; if(Accelerometer.isSupported) { oldAccX=0; oldAccY=0; oldAccZ=0; sum=0; acc1=new Accelerometer(); acc1.addEventListener(AccelerometerEvent....
来源: Laya_社区 发布时间: 20160110
...tends Laya.Script { onAwake(): void { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500,100); img.skin = "resources/layabox.png"; //纹理压缩的图片的路径 } onStart() { Laya.Stat.show(0, 0); //性能面板 } } 发布后,使用的图片就是压缩后的图片了。 3.2 图集...
来源: Laya3.0_文档 发布时间: 20251010
... MyScene.load(this._sceneURl) as MyScene; this._scene.output(); Laya.stage.addChild(this._scene); var camera:Laya.Camera = this._scene.getChildByName("Main Camera") as Laya.Camera; camera.addComponent(CameraMoveScript); var tiger:Laya.Sprite3D = this._scene.getChildByName("tiger_idle&...
来源: Laya_社区 发布时间: 20180317
...LINK, this, (event: Laya.Event) => { console.log(event); }); Laya.stage.addChild(ele); zyy • 2021-11-09 13:51 @Laya_Fred: 这段代码 很简单 只是点击 输出 event 如果 把Laya.stage.y 向下调整 就会导致它点击区域错误 zyy • 2021-11-09 13:55 @Laya_Fred:而且Laya.stage.y...
来源: Laya_社区 发布时间: 20211105
...s._arrCheck[3] = true; } break; } sp_icon.pos(input.width + 10, -8); input.addChild(sp_icon); } /** * 占位符处理 * @param input TextInput */ private _setPlaceHolder(input: Laya.TextInput) { switch (input.name) { case "input_nickname": // input.changeText("限6个中文以内"); input.prompt = "...
来源: Laya_社区 发布时间: 20200410
...yerObject("object","Role") //取到对象层上矩形位置 然后直接用addChild 把角色丢进地图里 打开游戏,角色出现了 再用getLayerByName('Roadblock') //取到Roadblock层 人物移动的时候,抹上黑色的地方就不让走 我还用Laya.Rectangle和scrollRect 做了个2...
来源: Laya_社区 发布时间: 20180524
...名.png) img.skin = "test/c1.png"; //添加到舞台上显示 Laya.stage.addChild(img); ``` 代码运行效果如图9所示:  (图9) 如图9所示,我们成功的从图集中取出小图资源并应用到项目中,而代码中的`sink`值`test/c1.png`,其实就是图...
来源: Laya2.0_文档 发布时间: 20210715
...名.png) img.skin = "test/c1.png"; //添加到舞台上显示 Laya.stage.addChild(img); ``` 代码运行效果如图9所示:  (图9) 如图9所示,我们成功的从图集中取出小图资源并应用到项目中,而代码中的`sink`值`test/c1.png`,其实就是图...
来源: Laya2.0_文档 发布时间: 20210714
...(child); this._shurikenParticleSystem.push(child.particleSystem); } } this.addChild(this._particle); this._isInited = true; } //粒子特效播放,由于一个复杂的粒子特效由多个粒子系统组成,此时遍历粒子特效所有粒子系统对象调用play() play(): void { for (var i =...
来源: Laya3.0_文档 发布时间: 20251010
...(child); this._shurikenParticleSystem.push(child.particleSystem); } } this.addChild(this._particle); this._isInited = true; } //粒子特效播放,由于一个复杂的粒子特效由多个粒子系统组成,此时遍历粒子特效所有粒子系统对象调用play() play(): void { for (var i =...
来源: Laya3.0_文档 发布时间: 20250104