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

大约有 225 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0041 秒)

21. 组件脚本的内置方法 · LayaAir3.3 · 引擎文档 · LAYABOX [ 84%]

... void { this._level = Math.round(Math.random() * 5) + 1; this._text = this.owner.getChildByName("levelTxt") as Laya.Text; this._text.text = this._level + ""; } //每帧更新时执行 onUpdate(): void { //让持续盒子旋转 (this.owner as Laya.Sprite).rotation++; } //开始碰撞时执行 onTrigg...

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

22. animation动画结束后怎么监听? [ 84%]

...放完了没有侦听到COMPLETE事件。 肖刚 • 2020-06-18 00:54 this.owner.ani.on(Laya.Event.COMPLETE,this.onSplashComplete); this.owner.ani.play(0,false); this.owner.stage.on(Laya.Event.COMPLETE,this.onSplashComplete); 这两个侦听器都没有侦听到COMPLETE事件的发生。 FullyI • ...

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

23. box2d引擎报错问题 [ 84%]

...te (laya.core.js:21262)   相关逻辑代码如下: moveSuccess(){ this.owner.removeSelf(); Laya.Pool.recover("flyCat", this.owner) } onTriggerEnter(other: any, self: any, contact: any): void { if (other.label === "cloud") { Laya.Tween.clearAll(this._sp) let effect: Laya.Animation = Laya.Pool.get...

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

24. 3D模型x方向角度不为0,时。挂刚体和碰撞器。在rotate y方向时。模型会乱转,不挂就没问题 [ 84%]

...没问题   模型x转了-90度   console.log(angle, " lastangel ", this.owner.transform.rotationEuler.y) this.lastAngle = this.owner.transform.rotationEuler.y; this.owner.transform.rotate(new Vector3(0, angle - this.lastAngle, 0), false, false) 打印出来看到y方向角度一直在变。   ...

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

25. Laya3.0 图片拼合缩放会导致两张图片之间有一条横线[已解决] [ 84%]

...ZONE 微信 biubiubiu 赞同来自: 以下是测试代码         this.owner.scene.scale(1.25, 1.25) //使用缩放后 图片拼合会多一条线 2.0中没有此问题         Laya.loader.load("http://103.219.177.59:63344/%2 ... ot%3B, Laya.Loader.TEXTURE2D).then((texture: Laya.Texture2D) =...

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

26. 鼠标脚本(JavaScript-3D基础(JS)-LayaAir3D之鼠标交互) [ 84%]

...---Script3D中的鼠标事件。如果想要使用鼠标脚本,在脚本owner上还是需要有物理碰撞器。 **Tips**:鼠标脚本依赖射线检测,只不过不用开放者自己手动创建射线了。 **鼠标脚本内容:** > Method `onMouseClick():void` 鼠标点击时执行 `onMou...

来源: Laya2.0_文档 发布时间: 20210715

27. Laya 问题合集 希望会的大神能帮我解答一下,谢谢 [ 84%]

...有些问题想请教下   1. 看一些案例里面  有些语句带有 owner  这字样,但从头到尾都没有声明过的也不知道是什么,百度了好像也没介绍owner到底是什么。。 希望有大神能告诉我 owner到底是代表什么。。 有什么用?   2. 编辑模...

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

28. 裁切图片后,该用什么方式去重绘出裁切后的图片 [ 83%]

...边形位置点数据): 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.graphics; ...

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

29. 物体随着鼠标滑动旋转脚本 [ 83%]

...什么意思有什么作用 ObjectRotate.prototype._initialize = function (owner) {     var _this = this;     ObjectRotate.__super.prototype._initialize.call(this,owner);       //在this(调取本函数的的对象)作用域内,侦听mousedown(鼠标按下)事件,如果侦听...

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

30. 我竟然被射线检测这个小功能给难了一天了 [ 83%]

...esult() physics:Laya.PhysicsSimulation; onAwake():void{ this.camera = this.owner.getChildByName("Main Camera") as Laya.Camera; let scene: Laya.Scene3D = this.owner.scene as Laya.Scene3D;   this.physics=scene.physicsSimulation;     console.log("相机位置",(this.owner.getChildByName("Main Camera...

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