大约有 178 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.RadioGroup }) public radiogroup: Laya.RadioGroup; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.radiogr...
来源: Laya3.0_文档 发布时间: 20251016
...date()去调用的。 在编辑的时候两种onUpdate也是有差异的,extends Laya.Script的脚本中的onUpdate,鼠标移上去是有功能说明的:每帧更新时执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 此方法为虚方法,使用时重写覆盖...
来源: Laya_社区 发布时间: 20190221
...附上代码 : (function () { 'use strict'; class GameMain extends Laya.Scene { constructor(){ super(); GameMain.instance = this; Laya.MouseManager.multiTouchEnabled = false; this.loadScene("m...
来源: Laya_社区 发布时间: 20201110
...nst { regClass, property } = Laya; @regClass() export class UI_ColorPicker extends Laya.Script { private skin: string = "atlas/comp/colorPicker.png"; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { La...
来源: Laya3.0_文档 发布时间: 20251010
...是要把unity场景导入到laya2.6. export default class SceneLoad extends Laya.Script{ constructor(){ super(); } onAwake(){ Laya.Scene3D.load("res/LayaScene_demo/Android/demo.ls",Laya.Handler.create(this,function(scene){ ...
来源: Laya_社区 发布时间: 20200516
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Button }) public btn: Laya.Button; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.btn.scale(5, 5); //放...
来源: Laya3.0_文档 发布时间: 20251010
...: const { regClass, property } = Laya; @regClass() export class StartScene extends Laya.Script { onAwake(): void { Laya.timer.once(1000, this, () => { Laya.loader.loadPackage("common", "http://127.0.0.1:2840", (p) => { console.log("common", p); }) }); } } 2024-11-04 0 0 分享 微博 QZONE 微...
来源: Laya_社区 发布时间: 20241101
... > 移动灯光脚本 ```typescript export default class LightMoveScript extends Laya.Script3D { //需要操作的光源数组 public lights = []; //光源对应的位置偏移数组 public offsets = []; //光源对应的移动半径数组 public moveRanges = []; public onUpdate(){ var seed = Laya.t...
来源: Laya2.0_文档 发布时间: 20210715
... > 移动灯光脚本 ```typescript export default class LightMoveScript extends Laya.Script3D { //需要操作的光源数组 public lights = []; //光源对应的位置偏移数组 public offsets = []; //光源对应的移动半径数组 public moveRanges = []; public onUpdate(){ var seed = Laya.t...
来源: Laya2.0_文档 发布时间: 20210715
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Tree }) public tree: Laya.Tree; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { //初始化树状列表的数...
来源: Laya3.0_文档 发布时间: 20251010