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

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

341. 在UI类里调用启动类的静态函数失败了 [ 83%]

...= 99;//置最顶,这句话不写图层看不见 // info.init(); Laya.stage.addChild(info); } private onLoading(): void { var bj = new BeiJing(); Laya.stage.addChild(bj); } } new GameMain();   这个是我的UI类,我在这个类里调用GameMain.aaa();提示TypeError: GameMain.aaa is not a functi...

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

342. 在加载包含Animation的prefab后,动画没有显示 [ 83%]

...J = Laya.Pool.getItemByCreateFun("gk2v1",gkpref.create,gkpref); this.Scene.addChild(OBJ); })); 附件 : --> ZMW.zip 2020-10-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 王炸 赞同来自: 我尝试在加载...

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

343. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 82%]

...structor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:laya.physics.BoxCollider = this._boll1.addComponent(laya.physics.BoxCollider); box.height = 60; box.width = 28; //添加刚体 th...

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

344. Laya2.7.1 射线提示rayCast未定义 [ 82%]

....Script3D{ constructor() { super(); //创建场景 this.scene = Laya.stage.addChild(new Laya.Scene3D()); //添加相机 this.camera = (this.scene.addChild(new Laya.Camera(0, 0.1, 100))); this.camera.transform.translate(new Laya.Vector3(0, 0.7, 5)); this.camera.transform.rotate(new Laya.Vector3( -15,...

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

345. 计时器-延迟调用 [ 82%]

...wordWrap = true; text.valign = "middle"; text.align = "center"; Laya.stage.addChild(text); } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Timer_CallLater { constructor() { // 不支持WebGL时自动切...

来源: Laya_示例 发布时间: 20251209

346. Tween.to 执行失败 [ 82%]

...tch(dir){ case "up": hero_p1.roleAni.play(0,true,"p1_walk_up"); Laya.stage.addChild(hero_p1.roleAni); break ; case "down": hero_p1.roleAni.play(0,true,"p1_walk_down"); Laya.stage.addChild(hero_p1.roleAni); break ; case "left": hero_p1.roleAni.play(0,true,"p1_walk_left"); Laya.stage.addChild(hero_p1....

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

347. hitTestPrior点击穿透 [ 82%]

...#FFFF00"); sp.size(100,100); sp.on(Event.CLICK,this,onClickSp); Laya.stage.addChild(sp); var spchild:Sprite=new Sprite(); spchild.graphics.drawRect(0,0,200,200,"#FF0000"); spchild.size(200,200); spchild.on(Event.CLICK,this,onClickSpChild); sp.addChild(spchild); } private function onClickSpChild(e:Ev...

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

348. 龙骨动画demo [ 82%]

...skeleton.getAniNameByIndex(num - 1); skeleton.play(name) }));  this.owner.addChild(skeleton); 2019-04-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 laozhou 赞同来自: //创建一个Skeleton对象 var skele...

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

349. 物理引擎-布 [ 82%]

...esize); } function initMatter() { var gameWorld = new Sprite(); Laya.stage.addChild(gameWorld); // 初始化物理引擎 engine = Matter.Engine.create( { enableSleeping: true }); Matter.Engine.run(engine); var render = LayaRender.create( { engine: engine, container: gameWorld, width: stageWidth, hei...

来源: Laya_示例 发布时间: 20251209

350. Panel 的 滑动问题 [ 82%]

...ent.hScrollBarSkin = "";  panelParent.hScrollBar.isVertical = false; this.addChild(panelParent );   _putChild: function (parentName, path, col, row, cellSize, offset, scale)  { var root = this.getChildByName(parentName);        var cell = uiUtils.createSprite(path);       root.addChild(ce...

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