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

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

3951. 当使用代码创建打开场景时,onOpened触发了,但场景active和activeInHierarchy还是处于false,请问纯代码怎么实现场景创建激活,谢谢 [ 44%]

...('scene', scene.active, scene.activeInHierarchy); Laya.timer.frameOnce(10, this, () => {   console.log('scene 2', scene.active, scene.activeInHierarchy); });   日志:   附件 : --> 2019-02-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...

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

3952. sprite做的按钮点击无反应? [ 44%]

...; //dialog_mc.addChild(btn); Laya.stage.addChild(btn); btn.on(Event.CLICK, this, function(){ alert("点击"); }); 点击btn并未弹出alert,我也设置了btn的size,这是为什么? 2017-01-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容...

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

3953. 如何为灯光添加阴影(ActionScript-3D基础(AS3)-LayaAir3D之灯光) [ 44%]

... ....... // A sphere cast/receive shadow. var sphereSprite: MeshSprite3D = this.addPBRSphere(PrimitiveMesh.createSphere(0.1), new Vector3(0, 0.2, 0.5), scene); sphereSprite.meshRenderer.castShadow = true; sphereSprite.meshRenderer.receiveShadow = true; ``` 然后来看下效果。 ![](img/1.png)(图...

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

3954. Dialog 第一次打开总是出现在窗口右下角,这是为啥,再打开就正常剧中了? [ 44%]

...default class SettingDialog extends Laya.Dialog { constructor() { super(); this.loadScene('assets/scenes/dialogs/SettingDialog.scene'); } }{ "x":0, "type":"Dialog", "selectedBox":2, "selecteID":3, "searchKey":"Dialog", "props":{"width":1624,"sceneColor":"#000000","runtime":"script/view/dialogs/Setti...

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

3955. 关于位图字体的valign属性问题 [ 44%]

...0); mBitmap=new BitmapFont(); mBitmap.loadFont("date/data.fnt",new Handler(this,onLoadedFnt)); } private function onLoadedFnt():void { // TODO Auto Generated method stub Text.registerBitmapFont(mFontName,mBitmap); var text:Text=new Text(); text.pos(300,200); text.size(200,80); text.pivotY=text.heigh...

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

3956. 使用webgl之后toDataUrl返回黑色的图像 [ 44%]

...L); Stat.show(); Laya.stage.bgColor = "#ffcccc"; Laya.stage.on(Event.CLICK,this,onClick); sp= new Sprite(); sp.name='base'; sp.loadImage("logo.png"); Laya.stage.addChild(sp); } private function onClick():void { var htmlsss:String=(Laya.stage.getChildAt(0) as Sprite).drawToCanvas(100,100,0,0).getCanv...

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

3957. 含有List的Scene移除后List的item未移除,性能面板的Sprite一直增长 [ 44%]

...22-10-19 15:01 重写了createView; 将super.createView 替换为 let that=this; Laya.SceneUtils.createComp(a, that, that); that.hitTestPrior = true; 就会移除了,不知道会不会出其他问题T.T wxid_mq3mt1b4zxfq22 • 2022-10-20 16:55 十分感谢,这就下载2.13.2去学习。期待3.0...

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

3958. 微信小游戏wxmin图片加载有点问题 [ 44%]

...le.log(123120, ape) // Laya.loader.load('res/mao.jpg', Laya.Handler.create(this, function (){ // var t = Laya.loader.getRes('res/mao.jpg') // console.log(t) // var a = new Laya.Sprite() // a.graphics.drawTexture(t, 0,0) // a.scaleX = 0.3 // a.scaleY = 0.4 // a.pos(0,300) // Laya.stage.addChild(a) //...

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

3959. Laya3d球星添加了刚体,但是碰撞无法触发onTriggerEnter的问题,120元有偿悬赏解答 [ 44%]

... QZONE 微信 159*****332 赞同来自: 看着像刚提睡着了 设置 this.m_rig.sleepLinearVelocity = 0;试试 2020-07-28 0 1 分享 微博 QZONE 微信 shiyang 赞同来自: 两个isKinematic=true的刚体不触发碰撞 2020-07-28 0 3 分享 微博 QZONE 微信 ParadiseKiss 赞同来自: 有...

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

3960. 飞机大战js源码中判断语句问题 [ 44%]

...景位置的更新,实现背景滚动效果。 Laya.timer.frameLoop(1, this, onLoop); })() /** * 在onLoop函数内,更新box容器的位置。 */ function onLoop() { //设置背景容器由上向下移动 1px box.y += 1; //当背景1向下移动出游戏的显示区域 480*852,则将背景1...

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