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

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

101. 用ts写代码 能用npm包吗 还有es6语法 [ 72%]

...语法,但是ES6请谨慎使用,目前的浏览器基本上都不支持export import的使用! 2017-09-23 0 4 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 zhishaofei3 相关问题 预设怎么在代码中使用 这样写的代码,T...

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

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

...2-2-5 按里面的步骤为按钮绑定一个btn1.js 我在这样写的   export default class btn1 extends Laya.Script { constructor(){ alert("1"); //执行后这里触发了 super();} onEnable(){ alert("2"); //执行后这里触发了 } onclick(){ alert("3"); //执行后点击按钮这里没触...

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

103. 发布bili小游戏 开启版本号会报错 [ 72%]

...重新编译一下试试,编译后正常laya.js这个文件有这一行exports.HttpRequest=HttpRequest,但是在你的小游戏包我没有发现 159*****136 • 2020-05-11 10:31 @157*****593:多次尝试后发现,正常编译是有的,勾选重新编译后exports.HttpRequest=HttpRequest就...

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

104. 微信小游戏编译报错 [ 72%]

...code.js:10:31291) at n (http://127.0.0.1:23181/game/code.js:10:30084) at e.exports (http://127.0.0.1:23181/game/code.js:11:513) at Object.<anonymous> (http://127.0.0.1:23181/game/code.js:10:19569) at t (http://127.0.0.1:23181/game/code.js:10:326) at Object.e.exports.name (http://127.0.0.1:2318...

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

105. 弹窗视图组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 72%]

...import { RuntimeScriptBase } from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { this.closeBtn.on(Laya.Event.CLICK, this, () => { this.close(); }); } } 1.3.3 关联场景 设置好弹窗之后,需要用代码将Dialog与所需...

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

106. layabox7.1.17 beta ios打包后编译失败 [ 72%]

...j.app/ykmj normal armv7     cd /Users/wxh/Desktop/layabox/ios/ykmj     export IPHONEOS_DEPLOYMENT_TARGET=7.0     export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin...

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

107. layacmd atlas报错 [ 72%]

...rocess.js:319 throw errnoException(err, 'spawn'); ^ Error: spawn EACCES at exports._errnoException (util.js:1020:11) at ChildProcess.spawn (internal/child_process.js:319:11) at exports.spawn (child_process.js:369:9) at Object.<anonymous> (/usr/local/lib/node_modules/layacmd/layacmd-atlas.js:88...

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

108. 内嵌模式创建scene,运行时报找不到json文件 [ 72%]

...createView()进行创建,并且都是ide自动生成的代码。     export module ui { export class HelloUI extends Scene { public static uiView:any ={"type":"Scene","props":{"width":640,"height":1136},"compId":2,"child":[{"type":"Label","props":{"y":64,"x":214.5,"width":211,"text":"label","sty...

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

109. 绘制矩形与圆角矩形(TypeScript-LayaAir基础篇(TS)-矢量图) [ 72%]

... Sprite = Laya.Sprite;     import Stage = Laya.Stage;       export class Sprite_DrawShapes {         private sp: Sprite;           constructor()         {             //初始化舞台             Laya.init(500, 300);       ...

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

110. 分享关于TS在1.x和2.x模块差异 [ 72%]

...bundle.js。原因看后面。模块的导出和加载使用ES6标准的`export或者export default`和`import a from "./a"`。由于使用了browserify和tsify编译,browerify是根据入口文件开始查找所有import文件,根据依赖关系进行编译,所以根本找不到namespace的...

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