大约有 175 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)
分享 使用typescript开发项目,解决文件引用顺序问题 前几天好像看到有人说使用typescript开发项目时编译出来的js文件引用顺序不正确,我今天试了下,可以使用ts的import/export处理这个问题 一、调试 修改tsconfig.json,把module和targe...
来源: Laya_社区 发布时间: 20171120
...目名称,大家随意呀,选择一个路径,编程语言选择JavaScript即可,点击创建即可。 PS:整个项目结构大家可以边学习边熟悉,也可以查看官方教程,不着重讲解,相信大家经过两三个小练习就可以熟悉了。 第二步:我们把窗口切...
来源: Laya_社区 发布时间: 20190117
....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
...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
...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
...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
...nTriggerEnter, export default class BulletControlTrigger extends Laya.Script3D { constructor(){ super(); } /** * 开始触发时执行 * 此方法为虚方法,使用时重写覆盖即可 */ onTriggerEnter(other){ console.log("onTriggerEnter"); }; onTriggerStay(other){ console.log("onTrigg...
来源: Laya_社区 发布时间: 20191215
... 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
...一个btn1.js 我在这样写的 export default class btn1 extends Laya.Script { constructor(){ alert("1"); //执行后这里触发了 super();} onEnable(){ alert("2"); //执行后这里触发了 } onclick(){ alert("3"); //执行后点击按钮这里没触发,不知道为什么 //Laya.Scene.ope...
来源: Laya_社区 发布时间: 20181028
...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