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

大约有 191 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0043 秒)

11. 阻止点击穿透问题 [ 66%]

...alpha = 0.8; bg.graphics.drawRect(0,0,W,H,"#000000"); this.prizeAlertLayer.addChild(bg); this.prizeAlertLayer.addChild(Main.items["prizeinfo"]); Laya.stage.addChild(this.prizeAlertLayer);   this.prizeAlertLayer.visible = false; 附件 : --> 2018-06-01 1 条评论 免费帖 --> 分享 微博 QZONE ...

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

12. graphics如何实现橡皮擦效果 [ 65%]

...e(); // 设置容器为画布缓存 box.cacheAs = "bitmap"; this.layCanvas.addChild(box); // 绘制红色方块 var red = new Sprite(); red.graphics.drawRect(0, 0, 150, 150, "#ff0000"); box.addChild(red); // 绘制一个圆形区域,利用叠加模式,抠除上面红色区域 var circle = new Sp...

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

13. 怎么给UI上的Label 的text赋值 [ 65%]

... 是你的UI Lancer • 2018-08-10 17:04 @Supermang42:我添加Laya.stage.addChild(this)之后,text才赋值,但是把先前addChild()的内容给覆盖了,怎么办 Supermang42 • 2018-08-10 19:00 階層問題,你可以調整階層或者是位置放在不同地方上就不會覆蓋住...

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

14. laya.d3.core.reflectionprobe.ReflectionProbe_API3.0 [ 65%]

...IndexInReflectionList _initialize _processActive _setIndexInReflectionList addChild addChildAt addChildren addComponent addComponentInstance addInputChild callLater clearTimer clone contains destroy destroyChildren event frameLoop frameOnce getChildAt getChildByName getChildIndex getComponent getCom...

来源: Laya3.0_api 发布时间: 20231102

15. 使用typescript开发项目,解决文件引用顺序问题 [ 64%]

...输入地址运行//main.js import txt from './helloworld.js' Laya.stage.addChild(txt) //helloworld.js var txt = new Laya.Text(); txt.text = "Hello Layabox"; txt.color = "#ffffff"; export default txt  二、发布 安装工具,在ide上使用快捷键【ctrl+` 】打开终端,输入下面指令...

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

16. 想做天空盒但是camera上没有sky这个属性 [ 64%]

...ya.stage.on(Event.RIGHT_MOUSE_DOWN, this, Destruction); scene = Main.box3D.addChild(new Scene3D()) as Scene3D; camera = scene.addChild(new Camera(0, 0.1, 100)) as Camera; camera.transform.rotate(new Vector3(10, 0, 0), true, false); camera.addComponent(CameraMoveScript); camera.clearFlag = BaseCamera...

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

17. 加上size设置后,精灵不能点击. [ 64%]

...Event.CLICK, this, () => { img.y -= 10; }) img.pos(100, 300) Laya.stage.addChild(img) } function createFlower() { var f = new Laya.Sprite(); var r = Math.random(); var s = r > 0.66 ? "img/flower1.jpg" : r > 0.33 ? "img/flower2.png" : "img/flower3.jpg" f.loadImage(s); f.on(Laya.Event.CLICK, ...

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

18. 精灵 · LayaAir3.0文档 · LAYABOX [ 64%]

...ke(): void { let sprite = new Laya.Sprite(); // 添加到舞台 Laya.stage.addChild(sprite); } 3.2 显示图片 图片的显示是游戏开发的基础,Sprite类中用于显示图片是 Sprite.loadImage 和 Sprite.texture。 3.2.1 loadImage /** * <p>加载并显示一个图片。相当于加...

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

19. laya.d3.core.light.LightSprite_API3.0 [ 64%]

...tion shadowStrength timer transform url Methods _initialize _processActive addChild addChildAt addChildren addComponent addComponentInstance bubbleEvent callLater clearTimer clone contains destroy destroyChildren event frameLoop frameOnce getChildAt getChildByName getChildIndex getComponent getCompo...

来源: Laya3.0_api 发布时间: 20231115

20. TiledMap地图 · LayaAir3.0文档 · LAYABOX [ 63%]

... private onLoaded(): void { this.tMap.mapSprite().removeSelf(); this.owner.addChild(this.tMap.mapSprite()); } //地图加载完成的回调 private completeHandler(e: any = null): void { this.onLoaded(); } } 编译运行代码,效果如图3-3所示,说明地图已创建成功。 (图3-3) 3.3...

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