大约有 27 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0036 秒)
...h.PI / 180);//把输入的角度值,转成弧度给_radian存起来。 } onStart() { console.log(this._radian); } } 2.4 是否为私有属性(影响面板可见) 除了前文中提到的hidden这个属性标识参数会影响属性在面板上是否可见之外。private参数也会影响属...
来源: Laya3.0_文档 发布时间: 20251010
...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
...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
...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
...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
... 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
...cript: Joystick; private cameraController: CameraController; onStart() { // 初始化组件引用 this.playerScript = this.player.getComponent(Player); this.joystickScript = this.joystick.getComponent(Joystick); this.cameraController = th...
来源: Laya_社区 发布时间: 20251125
...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
...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
...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