大约有 4,102 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0213 秒)
Laya_社区(3323) Laya2.0_文档(296) Laya_示例(141) Laya2.0_示例(117) Laya3.0_文档(116) Laya3.0_api(94) Laya2.0_api(9) laya_api(6)
...如 onEnable(): void { const { x, y, width, height } = this.box Laya.loader.load('comp/image.png').then(v=>{ const texture = this.box.drawToTexture(width, height, x, y) as Laya.Texture this.snapshot.texture = texture })...
来源: Laya_社区 发布时间: 20240425
...主界面脚本中写入按钮的监听 //下拉菜单信息按钮监听 this.AllTitleButton.on(Laya.Event.MOUSE_DOWN, this, ButtonClickManager.clickinstance.AllTitleButtonClick); 而在另外的一个单例脚本中单例分离了执行方法 因为按钮监听太多 需要分离 监听和执行...
来源: Laya_社区 发布时间: 20190410
... //设置舞台背景颜色 Laya.stage.bgColor = "#ffffff"; //资源路径 this.skin1 = "checkbox.png"; this.skin2 = "checkbox.png"; //加载资源成功后,执行onLoad回调方法 Laya.loader.load([skin1,skin2],Laya.Handler.create(this,onLoaded)); function onLoaded(){ //创建一个CheckBox实...
来源: Laya2.0_文档 发布时间: 20210715
...的多边形位置点数据): draw() { const pp = this.owner.getComponent(Laya.PolygonCollider).points; let points = this.pointS_to_pointA(pp) let owner: Laya.Sprite = this.owner as Laya.Sprite const ctx = owner.grap...
来源: Laya_社区 发布时间: 20200428
...artUI { constructor() { super(); this.btnStart.on(Laya.Event.CLICK, this, this.startGame); } startGame(): void { //Laya.Scene.open("GameView.scene"); if (!Main.gameView) { Main.gameVie...
来源: Laya_社区 发布时间: 20190510
...才对啊? Sprite.as public function set transform(value:Matrix):void { this._tfChanged = false; var m:Matrix = this._transform || (this._transform = _createTransform()); value.copyTo(m); _setTransform(m); //设置transform时重置x,y if (value) { _x = value.tx; _y = value.ty; value.tx = value.ty...
来源: Laya_社区 发布时间: 20181125
...交 2 个回复 layabox 赞同来自: 开发者自己写的错误代码,this._closeButton = fgui.UIPackage.createObject("Package1", "image"); 应该改成this._closeButton = fgui.UIPackage.createObject("Package1", "Component1"); 2025-09-08 0 2 分享 微博 QZONE 微信 LayaAir大为 赞同来自:...
来源: Laya_社区 发布时间: 20250829
...; //创建动画模板 templet = new Templet(); templet.on(Event.COMPLETE, this, parseComplete); templet.on(Event.ERROR, this, onError); //加载动画文件 templet.loadAni("res/spine/goblins/goblins.sk"); } private function onError():void { trace("parse error"); } private function parseComplete():...
来源: Laya2.0_文档 发布时间: 20210715
... { var _canvas:* =this.drawToCanvas(this.width,this.height,0,0); var base64:* = _canvas._canvas.source.toDataURL(); return base64; } 附件 : --> 2017-04-01 添...
来源: Laya_社区 发布时间: 20170401
...位置(Transform.rotation)。 当我利用下式旋转后, this.needle.transform.rotate(vect,false,false); 我可以看到模型transform.rotation值的变化, console.log(this.needle.transform.rotation); 但是,我查看 console.log(this.needle.transform.ro...
来源: Laya_社区 发布时间: 20171206