大约有 282 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0059 秒)
...在浏览器中运行就返回false,复制失败。后来用原生的JavaScript(不用Laya)直接通过点击事件调用,也是成功的。 查看Web API文档,关于document.execCommand有以下说明: 注 对于'cut' 和'copy' 指令,只有当用户启动的线程调用该方法时...
来源: Laya_社区 发布时间: 20180330
... const { regClass, property } = Laya; @regClass() export class CameraMoveScript extends Laya.Script3D { /** @private */ protected _tempVector3: Laya.Vector3 = new Laya.Vector3(); protected lastMouseX: number = 0; protected lastMouseY: number = 0; protected yawPitchRoll: Laya.Vector3 = new Laya.Vecto...
来源: Laya3.0_文档 发布时间: 20251010
...报错this.zombieAnimator.on is not a function 脚本组件继承于 Laya.Script。 其中的_update方法,多长时间会调用一次? 可以设置调用时间吗? AS环境下调用DebugTool.init会出现编译时报错 如何在PC端浏览器的调试面板调用滚动条? laya2.0调用sce...
来源: Laya_社区 发布时间: 20171115
...码如下: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } event1(p1:any, p2:any): void { console.log("event1",p1,p2); } } 在脚本中创建event1的方法和接收两个参数,最后我们来...
来源: Laya3.0_文档 发布时间: 20260128
....transform.rotate(new Laya.Vector3(0, 0.9, 0)); obj.addComponent(BoxControlScript); //旋转方向与角度设置 //var vect = new Laya.Vector3(0,1,0); //每10毫秒旋转一次 //Laya.timer.loop(10,null,function(){ //obj.transform.rotate(vect,false,false); //}); })); })); })(this); class BoxControl...
来源: Laya_社区 发布时间: 20200611
...是LayaAir2.0版本做的以下内容. 我在一个脚本里继承了Laya.Script然后写了以下方法: 主要目的就是做射线碰撞检测. onStageMouseDown(): void { this._rayPt.x = Laya.MouseManager.instance.mouseX; this._rayPt.y = Laya.MouseManager.instance.mouseY; GameManager.instance.mai...
来源: Laya_社区 发布时间: 20190319
...s");` 2. iOS 项目 iOS项目构建完成后,项目目录下的 resource/scripts/index.js 脚本的最后有个执行loadUrl的函数,这里会加载首页地址,修改这里的地址就能切换单机版和网络版,单机版的地址固定为 `http://stand.alone.version/index.html`。 例...
来源: Laya2.0_文档 发布时间: 20210715
... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { // 设置单例 static instance: Main; constructor() { super(); Main.instance = this; } @property({type:Laya.Sprite3D}) private target: Laya.Sprite3D; @property({type:Laya.UI3D}) private ui3d: Laya.UI3D; public anima...
来源: Laya3.0_文档 发布时间: 20251010
...1. 没有用 力和速度 作为移动 2.用 tween 缓动到像素点 3.用script 脚本 每帧刷新 _sysPosToPhysic 4.碰撞时 会出现 碰撞体信息消失的情况 上面截图 5.劳烦官方大大看一下 附件 : --> testDemo.zip 2022-07-15 1 条评论 免费帖 --> 分享 微博 QZONE 微...
来源: Laya_社区 发布时间: 20220715
...gClass, property } = Laya; @regClass() export class SpotLight extends Laya.Script { @property({ type: Laya.Sprite }) private spotLight: Laya.Sprite; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { this.setSpotLight(); } // 创建聚光灯 setSpotLight(): void { this...
来源: Laya3.0_文档 发布时间: 20251010