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

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

11. 组件装饰器说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 72%]

...h.PI / 180);//把输入的角度值,转成弧度给_radian存起来。 } onStart() { console.log(this._radian); } } 2.4 是否为私有属性(影响面板可见) 除了前文中提到的hidden这个属性标识参数会影响属性在面板上是否可见之外。private参数也会影响属...

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

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

...Script { private mCurrIndex: number = 0; private mArmature: Laya.Skeleton; onStart() { console.log("Game start"); //加载内置骨骼动画资源 Laya.loader.load("skeleton/Dragon/Dragon.sk").then((templet: Laya.Templet) => { //创建模式为1,可以启用换装 this.mArmature = templet.build...

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

13. Windows扩展 · LayaAir3.3 · 引擎文档 · LAYABOX [ 67%]

...ss, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { alert(testLib.nativeAdd(10, 11)); } } 因为LayaNative的扩展功能只支持Windows平台,所以只能通过Windows预览或发布为Windows项目才能得到正确的结果。运行效果如图3-2所示, ...

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

14. [LayaAir3]Pool对象池获取继承对象时会返回基类对象 [ 66%]

...ss, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { let item1 = Laya.Pool.createByClass(TestClass); console.log('item1:', item1.type); Laya.Pool.recoverByClass(item1); let item2 = Laya.Pool.createByClass(TestClass2); console.log('item2:', item2.type); console.log(i...

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

15. 引用外部脚本的方式 · LayaAir3.3 · 引擎文档 · LAYABOX [ 64%]

...xport class Main extends Laya.Script { private aStarInstance: AStarFinder; onStart() { console.log("Game start"); // 0表示通路,1表示障碍 let myMatrix = [ [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 1, 0, 1, 1, 0], [0, 0, 1, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 0], [1, 1,...

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

16. 加载.lh文件 运行后黑屏 无法显示 [ 63%]

...        this.first = true;         this.twoFirst = true; } onStart(){ this._scene = this.owner.parent as Laya.Scene3D;         this._text = this._scene.parent.getChildByName("ceshi") as Laya.Text;         this._camera = this._scene.getChildByName("camera") as Laya.Cam...

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

17. [LayaAirIDE3]2d相机打包后问题 [ 61%]

...cript: Joystick;     private cameraController: CameraController;      onStart() {         // 初始化组件引用         this.playerScript = this.player.getComponent(Player);         this.joystickScript = this.joystick.getComponent(Joystick);         this.cameraController = th...

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

18. [0]laya-zip游戏加载提速库(Laya3.0版本适配更新) [ 59%]

...s和laya-zip.d.ts文件放入项目中,IDE中勾选并应用 在Main.ts中 onStart()中加入:[code]LayaZip.Init(); // 3.0版本下建议配置为1 LayaZip.BasePathMode = 1;[/code] 需要注意的一点是: 在Laya 3.x版本下制作资源zip包时,使用的是构建发布后的release文件夹...

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

19. 预制体模块 · LayaAir3文档 · LAYABOX [ 55%]

...ty( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label )...

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

20. 预制体 · LayaAir3.3 · 引擎文档 · LAYABOX [ 55%]

...ty( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label )...

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