大约有 1,052 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0060 秒)
...如下: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { declare owner: Laya.Image; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { //需要先加载图集再使用,注意,图集要放到resources目录下或者在...
来源: Laya3.0_文档 发布时间: 20251128
...ir2-cmd 编译报错 真机调试报错:LayaPlayer不支持的标签</SCRIPT> 自定义场景类导出layaMaxUI.ts有前缀导致报错 小游戏项目 加载有中文的json文件 报错 本地调试加载本地图片都报错 runtime运行报错! 用了ByteArray的zlib.min.js后报错 ...
来源: Laya_社区 发布时间: 20181024
... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onAwake(): void { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500,100); img.skin = "resources/layabox.png"; //纹理压缩的图片的路径 } onStart() { Laya.Stat.show(0, 0); //性能面板 } } 发...
来源: Laya3.0_文档 发布时间: 20251010
...ss, property } = Laya; @regClass() export class LightOccluder extends Laya.Script { private spotLight: Laya.Sprite = new Laya.Sprite(); private background: Laya.Sprite = new Laya.Sprite(); private lightOccluder: Laya.Sprite = new Laya.Sprite(); private backgroundTexture: string = "resources/bg2.png"...
来源: Laya3.0_文档 发布时间: 20251010
...代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件...
来源: Laya3.0_文档 发布时间: 20251010
... { 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
...工具。 const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property(Number) public projectId: number = 23; private perfMain: LayaPerf = new LayaPerf(); onEnable(): void { this.perfMain.init(this.projectId); } } projectId使用后端给项目分配的项...
来源: Laya3.0_文档 发布时间: 20251010
...e_JJF/Conventional/JJF.lh"); layaMonkey.addComponent(MonkeyScript); camera.transform.lookAt(layaMonkey.transform.position, new Laya.Vector3(0, 1, 0)); //设置文本显示框位置 this.text.x = Laya.stag...
来源: Laya_社区 发布时间: 20190531
...精灵添加组件(脚本) monkey.addComponent(MonkeyScript); scene.addChild(monkey); //设置相机的观察目标为小猴子 camera.transform.lookAt(monkey.transform.position, new Laya.Vector3(0, 1, 0)); this.text...
来源: Laya_社区 发布时间: 20190605
...** * 在节点上添加2D拖尾渲染器的示例代码 */ export class NewScript extends Laya.Script { declare owner: Laya.Sprite; private _trail2D: Laya.Trail2DRender; //从场景文件中获取到的宽度曲线数据 private _widthCurve: any[]; //从场景文件中获取到的颜色渐变数据 ...
来源: Laya3.0_文档 发布时间: 20251010