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

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

351. Proto中关于bytes类型的问题 [ 73%]

...msg = 1; required uint32 channel = 2; };   想问下msg怎么赋值啊? var msgByteBuffer = new window['dcodeIO'].ByteBuffer().writeIString('aabbcc').flip(); var MsgClass:any = Root.lookup("XYMessage"); var msgInst:any = MsgClass.create({             'channel': 2,             'auth_in...

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

352. LayaBox HelloWorld实战 [ 73%]

...UI目录里面找到Button并拖拽到场景中,修改它的通用属性var为btnShow,常用属性label为helloworld   经过这两步我们的游戏场景就大功告成了。 第三步:我们把窗口切换到IDE的代码模式,在src目录下面新建一个scripts的文件夹,在script...

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

353. 代码里能控制图片的锚点吗? [ 73%]

代码里能控制图片的锚点吗? var heroidstr = "role/herohead"+Hero.getHeadID()+".png"; m_herohead = new Image(); var texture = Laya.loader.getRes(heroidstr); m_herohead.graphics.drawTexture(texture); m_herohead.anchorX = 0.5; m_herohead.anchorY = 1; m_herohead.pos(m_heroPosX,m_heroPosY); ...

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

354. ComboBox属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 73%]

...ler.create(this, this.onLoadComplete)); } private onLoadComplete(): void { var cb: ComboBox = this.createComboBox(this.skin); cb.autoSize = true; cb.pos((Laya.stage.width - cb.width) / 2, 100); cb.autoSize = false; } private createComboBox(skin: String): ComboBox { var comboBox: ComboBox = new Combo...

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

355. 关于graphics镂空的问题https://ask.layabox.com/question/139 [ 73%]

...on-out实现flash中两次draw镂空可点击穿透完全一致的效果。var redBox:Sprite = new Sprite(); redBox.pos(250,200); redBox.autoSize = true; redBox.graphics.drawRect(0,0,100,100,'#ff0000'); Laya.stage.addChild(redBox); redBox.on("click",this,function(){ trace("click redbox"); }); redBox...

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

356. 火狐花屏问题 [ 73%]

...问题,onFireFox的判断laya2去掉了, 我自己从laya1找回来; var onload = function (imageData) {                 clear();                 if (imageData) {                     var image = imageData;                     if (type !== "nativeimage") {  ...

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

357. 除了用“+"拼接,如何创建格式化字符串? [ 73%]

...人 赞同来自: 除了AS,JS和TS都可以做到 以js为例: // ES6: var h = 'Hello'; var w = 'World'; var helloWorld = `${h} ${w}`; console.log(helloWorld); // 用在console console.log("%s%d", "one plus one equals ", 2) 2017-10-26 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回...

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

358. 关于 Laya.timer.scale = 0 暂停的问题 [ 73%]

...间管理器的引用,不允许缩放。*/         public static var timer:Timer = null;         /** 表现时间管理器,可以用来控制渲染表现,可以通过scale缩放,来表现慢镜头*/         public static var scaleTimer:Timer = null;   试一下scalet...

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

359. 2D物理-复合碰撞器 [ 73%]

...t; import laya.webgl.WebGL; public class Physics_Physics_Tumbler { private var count = 0; private var box: Sprite; private var totalBox = 200; private var label: Label; public function Physics_Tumbler() { Laya.Config.isAntialias = true; Laya.init(1200, 700, WebGL); Stat.show(); Physics.enable(); Phy...

来源: Laya2.0_示例 发布时间: 20251130

360. 如何清理所有的子无素 [ 73%]

如何清理所有的子无素 比如: for (var i = 0; i < tempStringArray.length; i++) { var img = new Laya.Image(); //加载显示图片,坐标位于100,50 var tempImageName = "comp/poke_" + tempStringArray[i] + ".png"; img.loadImage(tempImageName, i * 30, 5); img.scaleX = 0.4; img.scaleY ...

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