大约有 113 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0130 秒)
...y 的值,用于控制 clip 对象的显示位置。 clip.on(Event.CLICK, this, onClick);//给 clip 添加点击事件函数侦听。 Laya.stage.addChild(clip);//将此 clip 对象添加到显示列表。 } private function onClick():void { trace("clip 的点击事件侦听处理函数。clip.total...
来源: Laya3.0_api 发布时间: 20231115
...器。功能同Laya.timer.clearTimer()。 Parameters caller: any 执行域(this)。 method: Function 结束时的回调方法。 Returns void clone clone(): Camera Overrides RenderableSprite3D.clone Defined in laya/d3/core/Camera.ts:758 Returns Camera contains contains(node: Node): boolean Inherited...
来源: Laya3.0_api 发布时间: 20231115
...必须的 @IEditorEnv.regClass() export class TestSceneScript { //注意:this是当前的IEditorEnv.IGameScene对象,如果不需要,也可以省略这个声明 static test(this: IEditorEnv.IGameScene, msg: string) { console.log(msg); //hello return "ok"; } } //下面是UI进程的代码 let r...
来源: Laya3.0_文档 发布时间: 20251010
...是直接侦听列表的ClickItem事件: list.on(Laya.UIEvent.ClickItem, this, this.onClickItem); // 回调函数的第一个参数就是当前被点击的对象 function onClickItem(item: GObject): void { console.log("点击了对象:" + item.title); //获得这个对象在列表中的索引的...
来源: Laya3.0_文档 发布时间: 20251128
...器。功能同Laya.timer.clearTimer()。 Parameters caller: any 执行域(this)。 method: Function 结束时的回调方法。 Returns void clone clone(): Camera Inherited from Camera.clone Overrides RenderableSprite3D.clone Defined in laya/d3/core/Camera.ts:758 Returns Camera contains contains(no...
来源: Laya3.0_api 发布时间: 20231115
...e. Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store. 2018-02-28 0 2 分享 微博 QZONE 微信 riven 赞同来自: 请问你们新的库什...
来源: Laya_社区 发布时间: 20180225
...; constructor() { super(); } //组件被启用后执行 onEnable(): 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....
来源: Laya3.0_文档 发布时间: 20251010
...index: number, playstate: Laya.AnimatorState | Laya.AnimatorState2D) { ... this.model = animator.owner as Laya.Sprite3D;//得到Cube节点 } ... /** * 动画状态退出时执行。 */ onStateExit(): void { console.log("动画退出了"); //平移操作 let position = new Vector3(1, 1, 1); this.mode...
来源: Laya3.0_文档 发布时间: 20251010
...resource/ui/progress.png", "resource/ui/progress$bar.png"], Handler.create(this, onLoadComplete));//加载资源。 } private function onLoadComplete():void { progressBar = new ProgressBar("resource/ui/progress.png");//创建一个 ProgressBar 类的实例对象 progressBar 。 progressBar.x = 100;/...
来源: Laya3.0_api 发布时间: 20231115
...事件监听方式和Laya.Script命名函数方式处理输入。例如: this.aNode.on(Laya.Event.CLICK, ()=> { console.log("clicked"); }); class MyScript extends Laya.Script { //脚本事件 onMouseClick(e:Event) { console.log("clicked"); } } aNode.addComponent(MyScript); 以上两种方式是...
来源: Laya3.0_文档 发布时间: 20251010