大约有 225 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0043 秒)
...dth - bg.width >> 1, Laya.stage.height - bg.height >> 1); this.owner.addChild(bg); } private createTimerAnimation(): void { this.counter = new Laya.Clip(this.clipSkin, 10, 1); this.counter.autoPlay = true; this.counter.interval = 1000; this.counter.x = (Laya.stage.width - this.counter.wi...
来源: Laya3.0_文档 发布时间: 20251010
...节点上添加下面这段脚本 onAwake(): void { this.owner.bar.on(Laya.Event.MOUSE_UP, () => { console.log("aaa"); }) } 2025-07-11 0 1 分享 微博 QZONE 微信 Archangelᴱᴿᴵᑦ 赞同来自: this.owner.on(Laya.Event.CHANGE, this, ()...
来源: Laya_社区 发布时间: 20250709
... @regClass() export default class DirectMove extends Laya.Script { declare owner: Laya.Sprite3D; private characterController: Laya.CharacterController; onAwake(): void { // 获取 角色控制器 组件并赋值给 characterController this.characterController = this.owner.getComponent(Laya.Character...
来源: Laya3.0_文档 发布时间: 20251010
... onTriggerEnter(e:Laya.RigidBody):void{ var cil:Laya.CircleCollider=this.owner.getComponent(Laya.CircleCollider); var rig:Laya.RigidBody=this.owner.getComponent(Laya.RigidBody); cil.enabled=false; rig.enabled=false; var self:Laya.Sprite= this.owner as Laya.Sprite; var ni:Laya.Animation=new Laya.An...
来源: Laya_社区 发布时间: 20190721
...RaycastHit(); } /*覆写3D组件方法,指3D对象加载组件时执行 *owner:此组件所属的3D对象 */ public _load(owner:Laya.Sprite3D):void{ //获取控制器UI this.rocker = Example_roleControl.rocker; this.attack = Example_roleControl.attack; } /*覆写加载组件的3D对象实例化...
来源: Laya_社区 发布时间: 20171113
...d static _uniqueIDCounter: number; protected _id: number; protected _cachedOwnerLayerMask: number; protected _cachedOwnerEnable: boolean; protected _enable: boolean; protected _owner: laya.d3.core.Sprite3D; /**是否已执行start函数。*/ started: boolean; /** * 获取唯一标识ID。 * @return ...
来源: Laya_社区 发布时间: 20171109
... } = Laya; @regClass() export class DayNight extends Laya.Script { declare owner: Laya.Sprite; private lightComp: Laya.DirectionLight2D; private dayTime: number = 0; private dayDuration: number = 24; // 一个完整周期的秒数 private displayText: Laya.Text; // 文本显示当前时间 onAwake()...
来源: Laya3.0_文档 发布时间: 20251010
...地面都设置了弹力 TestScript2 onAwake this.scene3D = this.owner as Scene3D; this.basketballCourt = this.scene3D.getChildByName("BasketballCourt") as Sprite3D; var collision:PhysicsCollider = this.basketballCourt.getChildByName("BasketballCourt1").getComponent(PhysicsCollider); collis...
来源: Laya_社区 发布时间: 20200512
...ength = 10; spi.filters = spi1.filters = spi2.filters = [blurFilter]; this.owner.parent.addChild(spi); this.owner.parent.addChild(spi1); this.owner.parent.addChild(spi2); // }) }求教以下大佬们,是否还有其他的截屏方法(使用了drawToCanvas,因为3d场景对象比较复杂,无...
来源: Laya_社区 发布时间: 20191230
...p.graphics.drawRect(20, 20, 100, 50, "#ffff00", "#00ff00", 5, false); this.owner.addChild(sp); 示例中的 20,20 是矩形起始点坐标,100是向右的宽度,如果是负数则是向左的宽度。50是向下的高度,如果是负数则是向上的高度。 运行效果: (图2-3) 2....
来源: Laya3.0_文档 发布时间: 20251010