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

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

81. 使用typescript开发项目,解决文件引用顺序问题 [ 65%]

分享 使用typescript开发项目,解决文件引用顺序问题 前几天好像看到有人说使用typescript开发项目时编译出来的js文件引用顺序不正确,我今天试了下,可以使用ts的import/export处理这个问题 一、调试 修改tsconfig.json,把module和targe...

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

82. LayaBox HelloWorld实战 [ 65%]

...目名称,大家随意呀,选择一个路径,编程语言选择JavaScript即可,点击创建即可。 PS:整个项目结构大家可以边学习边熟悉,也可以查看官方教程,不着重讲解,相信大家经过两三个小练习就可以熟悉了。 第二步:我们把窗口切...

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

83. RopeJoint代码动态创建 无法设置otherbody [ 65%]

....com * @ data: 2022-04-09 15:53 */ export default class fruit extends Laya.Script {     static Fru:fruit;     public rope:Laya.RopeJoint     constructor() {         super();        fruit.Fru=this;             }      onAwake() {         let rig:Laya.RigidBody=this.owner.get...

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

84. 动画节点 · LayaAir3.3 · 引擎文档 · LAYABOX [ 64%]

...gClass, property } = Laya; @regClass() export class Animation extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Animation }) //在IDE面板中显示属性 ani: Laya.Animation; constructor() { super(); } //组件被激活后执行,此时所有节点和组件均已创建...

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

85. 实例化 laya.ani.bone.Skeleton 对象报错 [ 64%]

...ani.bone.Skeleton 对象报错 export default class showSpine extends Laya.Script{ constructor() { super(); //创建一个Skeleton对象 //Laya let skeleton: laya.ani.bone.Skeleton = new laya.ani.bone.Skeleton(); } } 实例化报错 为啥 2018-09-28 添加评论 免费帖 --> 分享 微博 QZONE ...

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

86. 微信小游戏,实现监听前后台切换 [ 64%]

...import wxHelper from 'wxhelper' export default class welcome extends Laya.Script { constructor() { super() } onEnable() { wxHelper.onShow(this.resumeGame) wxHelper.onHide(this.pauseGame) } resumeGame () { console.log('resumeGame') } pauseGame () { console.log('pauseGame') } onDestroy () { wxHelper.o...

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

87. 两个移动的简单物体 onTriggerEnter 无法触发 (有悬赏) [ 64%]

...nTriggerEnter,   export default class BulletControlTrigger extends Laya.Script3D { constructor(){ super(); }  /** * 开始触发时执行 * 此方法为虚方法,使用时重写覆盖即可 */ onTriggerEnter(other){ console.log("onTriggerEnter"); };  onTriggerStay(other){ console.log("onTrigg...

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

88. 输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 63%]

... property } = Laya; @regClass() export class TextInputControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextInput } ) public txtin: Laya.TextInput; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方...

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

89. 请问js怎么触发按钮的onclick事件,按教程的写,触发不知道为什么。 [ 63%]

...一个btn1.js 我在这样写的   export default class btn1 extends Laya.Script { constructor(){ alert("1"); //执行后这里触发了 super();} onEnable(){ alert("2"); //执行后这里触发了 } onclick(){ alert("3"); //执行后点击按钮这里没触发,不知道为什么 //Laya.Scene.ope...

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

90. 单选框组容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 63%]

...oGroup: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.RadioGroup }) public radiogroup: Laya.RadioGroup; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { thi...

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