大约有 61 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)
... } onStart():void{ this.lab=this.owner as Laya.Label; } onUpdate():void{ if(this.lab==null){ console.log("lab为空"); return; } t...
来源: Laya_社区 发布时间: 20200602
...// img.skin = url; //ui组件直接设置skin也可以 img.pos(x, y); this.owner.addChild(img); }); } } 1.2 带类型的加载方式 有的时候,网络资源没有后缀名,又或者,图片xxx.png并非是当成Texture使用,需要被定义为TextureCube。所以,这些时候需要通过...
来源: Laya3.0_文档 发布时间: 20251010
...Script{ public title: string; constructor(){ super(); } public _initialize(owner: Laya.Sprite3D): void { super._initialize(owner); var sprite3D = this.owner as Laya.MeshSprite3D; var sprite3DMat = new Laya.StandardMaterial(); sprite3DMat.cull = Laya.BaseMaterial.CULL_NONE; var imageData = this.canva...
来源: Laya_社区 发布时间: 20180814
... public animator:Laya.Animator = null; public Init(){ this.sprite = this.owner as Laya.Sprite3D; this.animator = this.sprite.getComponent(Laya.Animator) as Laya.Animator; console.log("11"); } public RoleMove(dir:Laya.Vector3) { let norDir:Laya.Vector3 = Laya.Vector3.ZERO; Laya.Vector3.normalize(...
来源: Laya_社区 发布时间: 20191026
...撞到的物体 // this.text.text = "碰撞到了" + outHitResult.collider.owner.name; console.log("碰撞到物体!!" + outHitResult.collider.owner.name) } 附件 : --> 射线选取实体的问题.zip 2019-12-19 添加评论 已悬赏10元 --> 分享 微博 QZONE 微信 没有找到相关结果...
来源: Laya_社区 发布时间: 20191219
...his.enableRightClick(); //禁用Ctrl+c,Ctrl+v this.owner.on("keydown", this, (event: KeyboardEvent) => { if (event.ctrlKey && event.key === "c") { event.preventDefault(); } if (event.ctrl...
来源: Laya_社区 发布时间: 20251115
... //加载Base64图片数据 sp1.loadImage(e.target.result as string); this.owner.addChild(sp1); } }); 上述代码中,用 Laya.loader.fetch 加载图片二进制数据,根据自定义的规则,可以解析数据加密方式,并获得完整图片数据。在这里我们更多的介绍一下 L...
来源: Laya3.0_文档 发布时间: 20230303
... let btn:Laya.Button = LayaUtil.GetChildByPath(this.owner, "CreatePanel/BtnCreate"); btn.clickHandler = Laya.Handler.create(this, this.onClickCreate) this.drawGrid(); } onClickCreate() { // ()=>...
来源: Laya_社区 发布时间: 20231221
...= Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件被激活后执行,此时所有节点...
来源: Laya3.0_文档 发布时间: 20251010
...date(normalizeTime: number): void { const sp = this.playStateInfo.animator.owner as Laya.Sprite; sp.graphics.repaint(); } } 修改后的完整源码见附件。 LayaTest2.zip 2025-10-27 0 0 分享 微博 QZONE 微信 lv 赞同来自: layabox 崩溃问题会在3.3.3版本修复 2025-10-17 1 0 分享 ...
来源: Laya_社区 发布时间: 20251010