• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 178 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0040 秒)

111. Spine骨骼动画 · LayaAir3文档 · LAYABOX [ 58%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Sprite }) public sprite: Laya.Sprite; private spine: Laya.Spine2DRenderNode; private index: number = -1; //组件被激活后执行,此时所有节点和组件均已创建完毕,...

来源: Laya3.0_文档 发布时间: 20250104

112. 多光源渲染(ActionScript-3D基础(AS3)-LayaAir3D之灯光) [ 58%]

...来做讲解: > 移动灯光脚本 ```typescript class LightMoveScript extends Script3D { //需要操作的光源数组 public var lights: Array = []; //光源对应的位置偏移数组 public var offsets: Array = []; //光源对应的移动半径数组 public var moveRanges: Array = []; public f...

来源: Laya2.0_文档 发布时间: 20210714

113. Spine渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 57%]

...下: const { regClass, property } = Laya; @regClass() export class Demo extends Laya.Script { spine: Laya.Spine2DRenderNode; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { // 加载Spine动画数据资源(json文件),...

来源: Laya3.0_文档 发布时间: 20251128

114. 为什么创建的脚本 变量在编辑模式赋值后 运行时为undfined [ 57%]

... • 2018-10-24 18:14 写一个ts文件,写上 export default class Move extends Laya.Script{ /** @prop {name:target,tips:"目标容器",type:Prefab}*/ targetPrefab:Laya.Prefab; } 将文件在编辑模式下赋给点添加组件=》code=》move 然后创建一个box拖为预制体 放在...

来源: Laya_社区 发布时间: 20181024

115. 基于Cannon.js的物理系统(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 57%]

...脚本作为组件添加到精灵上。) ```typescript class colliderCheck extends Script3D{ /** * 开始触发时执行 * 此方法为虚方法,使用时重写覆盖即可 */ onTriggerEnter(other: PhysicsComponent): void { console.log("triggerEnter"); } /** * 持续触发时执行 * 此方法为...

来源: Laya2.0_文档 发布时间: 20210714

116. 升级到3.0-beta6无法选择资源了 [ 57%]

...None,也无法拖放! 代码如下: @regClass() export class NewScript extends Laya.Script {     //declare owner : Laya.Sprite3D;      @property(String)     public text: string = "";      @property(Laya.Image)     public image: Laya.Image = null;      constructor() {         s...

来源: Laya_社区 发布时间: 20230412

117. 内置骨骼动画 · LayaAir3.3 · 引擎文档 · LAYABOX [ 56%]

...例: const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { private mCurrIndex: number = 0; private mArmature: Laya.Skeleton; onStart() { console.log("Game start"); //加载内置骨骼动画资源 Laya.loader.load("skeleton/Dragon/Dragon.sk").then((templet: Laya....

来源: Laya3.0_文档 发布时间: 20251010

118. 请问Laya如何使用第三方物理库 [ 56%]

... / 60); }   再把CANNON.Body包装成组件 export class CannonRigidbody extends Laya.Script3D { static map: { [key: number]: Laya.Sprite3D } = {}; body: CANNON.Body; t: Laya.Transform3D; public onCollisionCB: (s: Laya.Sprite3D) => void; public ignoreRotate: boolean = false; ...OnAwake里面创...

来源: Laya_社区 发布时间: 20200217

119. ProtocolBuffer通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 56%]

...rotobuf"; const { regClass } = Laya; @regClass() export class ProtobufDemo extends Laya.Script { onEnable() { console.log("Game start"); } } 2.2 Protobuf示例脚本 引入了protobuf模块就可以直接在项目中使用了,这里我们写了一个简单的示例DEMO,完整代码如下: // s...

来源: Laya3.0_文档 发布时间: 20251010

120. LayaBox加载TiledMap地图和注意事项 [ 56%]

... [*] [/*] [*] [/*] [*] [/*] [/list] [code]export default class DesertUI extends Laya.Scene {    constructor() { super();        DesertUI.instance = this; Laya.MouseManager.multiTouchEnabled = false;        this.loadScene("Desert.scene"); //初始化舞台 Laya.init(Laya.Bro...

来源: Laya_社区 发布时间: 20190321