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

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

251. 区块地图-PerspectiveWall [ 55%]

...Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Laya.Event.CLICK, this, this.onStageClick); } createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/perspective_walls.json", new Rectangle(0, 0, L...

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

252. Sprite设置mask属性为什么显示是透明的?怎样才能显示正常? [ 55%]

...(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); mask.on(Laya.Event.CLICK,this,chick);   function chick(){ mask.destroy(); gameContainer.destroy(); }   gameContainer.mask=mask; Laya.stage.addChild(gameContainer);  })();  })(); 附件 : --> 2020-06-03 添加评论 免费帖 --> 分享 微...

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

253. clip清除一遍资源后再加载就无法显示了!有demo! [ 55%]

... Laya.stage.scaleMode = Stage.SCALE_FULL; Stat.show(); Laya.stage.on(Event.CLICK,this,clickFun); } private function clickFun():void { if( clip == null ){ clip = new Clip("1.png",6,6); Laya.stage.addChild(clip); clip.play(); }else{ clip.dispose(); clip = null; } } 请官方给一个解决方案 目...

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

254. clip里的WeakObject.I缓存的数据有问题 [ 55%]

... Laya.stage.scaleMode = Stage.SCALE_FULL; Stat.show(); Laya.stage.on(Event.CLICK,this,clickFun); } private function clickFun():void { if( clip == null ){ clip = new Clip("1.png",6,6); Laya.stage.addChild(clip); clip.play(); }else{ clip.dispose(); clip = null; } }   2017-11-28 0 0 分享 微博 QZON...

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

255. ProgressBar 代码问题 [ 55%]

...且模拟进度条加载 按钮代码: this.testLoadingBar_anim.on(Event.CLICK,this,()=>{     var loading : Onloading = new Onloading();     loading.popup(true);     Laya.timer.loop(100, this, loading.changeValue); }); 进度条代码: import Handler = Laya.Handler; export class Onloading e...

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

256. android旋转屏幕 半边黑屏 [ 55%]

...测试"; spr.addChild(te); Laya.stage.addChild(spr); Laya.stage.on(Event.CLICK, this, function():void { if (Laya.stage.screenMode == Stage.SCREEN_HORIZONTAL) { if (Browser.window.conchConfig) { Browser.window.conchConfig.setScreenOrientation(1); } Laya.stage.screenMode = Stage.SCREEN_VERTICAL; Laya....

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

257. 关于对象池Laya.Pool的用法 [ 55%]

...prites.push(sp); Laya.stage.addChild(sp); } } initialize(); Laya.stage.on("click", this, function() {     var sp;     for(var i = 0, len = sprites.length; i < len; i++)     {         sp = sprites.pop();         Pool.recover(SPRITE_SIGN, sp);      ...

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

258. 滑动条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 54%]

...终是整数。这个功能可用于实现分级的滑动条。 Change On Click 勾选后,直接点击滑动条就可以改变滑动条的值;如果不勾选,则只能拖动滑块改变滑动条的值。 以下属性用于绑定滑动条的功能部件。注意:当滑动条节点是预制体...

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

259. 鼠标事件能否在有图形的区域感应,特别是子项坐标为负数时(已经找到问题) [ 54%]

...00,300); testPan.graphics.drawRect(0,0,90,100,"#faaff0"); testPan.on(Event.CLICK,this,onMouseClick); testPan.width = 90; testPan.height = 100; var mcSp:Sprite = new Sprite(); mcSp.graphics.drawRect(0,0,90,100,"#fff000"); testPan.addChild( mcSp); mcSp.pos( -25,-90 ); } private function onMouseClick(e...

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

260. 如何在animation动画中添加事件影响动画,比如说按键或点击鼠标让动画位移? [ 54%]

...因为点击的区域偏移太远, 当时没点到. 谢谢大佬! (不过click范围为固定矩阵, 要是加个形状遮罩就好了) Monica • 2017-10-16 15:09 @shuoGG:可以参考下这个帖子中的做法:https://ask.layabox.com/question/1261 shuoGG • 2017-10-16 22:19 @Monica:十分感谢...

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