大约有 22 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0281 秒)
...码如下: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //共享材质,用于合批 public batchMat: Laya.Material; //颜色数目 private _colorNums = 20; //精灵数目 private _spriteNums = 200; private _createColorBufferData() { //随机给20个...
来源: Laya3.0_文档 发布时间: 20251010
...10 2019-05-10 17:10:38.479438+0800 SwiftLayaNative[98971:4069811] Start js scripts/apploader.js 2019-05-10 17:10:38.479618+0800 SwiftLayaNative[98971:4069811] OpenGL ES version [OpenGL ES 3.0 APPLE-17.0.37] 2019-05-10 17:10:38.479792+0800 SwiftLayaNative[98971:4069811] INFO:gles 支持的最大顶...
来源: Laya_社区 发布时间: 20190510
...擎中,组件和系统的职责融合在组件脚本(即继承自 Laya.Script 的类)中体现: 组件部分:通过类中的属性字段或访问器承担组件的数据职责,通常使用 @property() 装饰器标记这些字段,将其暴露到IDE属性面板,方便开发者进行可...
来源: Laya3.0_文档 发布时间: 20251010
...代码: 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, ...
来源: Laya3.0_文档 发布时间: 20251010
...代码如下所示: const { regClass } = Laya; @regClass() export class Script extends Laya.Script { } 1.2 IDE中如何找到被识别的组件脚本 只有使用了@regClass()装饰器标识,才会被LayaAir3-IDE识别为自定义组件脚本,可以被节点(实体)所添加, 添加组...
来源: 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
...IDE插件开发说明一、插件能力二、插件运行环境2.1 在Laya.Script中使用本地能力2.2 UI进程脚本和Scene进程脚本通讯的方式2.3 预览运行进程和UI进程的通讯方式三、制作编辑器UI四、程序化生成界面4.1 常用方法4.2 示例五、自定义Inspec...
来源: Laya3.0_文档 发布时间: 20251010
...t { regClass } = Laya; @regClass() export class WebSocketDemo extends Laya.Script { private socket: Laya.Socket; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { this.socket = new Laya.Socket(); // 注册事件监听 this.socket.on(Laya.Event.OPEN, this, this.onSocke...
来源: 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
...Class, property } = Laya; @regClass() export class TestSprite extends Laya.Script { // 用于显示鼠标点击的位置 @property({ type: Laya.Sprite }) public hit: Sprite; private _temp: Sprite; private _allAgent: Nav2DAgent[] = []; private findCompents(lists: any[], sprite: Sprite, componentType:...
来源: Laya3.0_文档 发布时间: 20251010