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

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

21. 新手!谁懂得把下面两个文件转成layaair可以运行的代码 [ 85%]

...     {         CONFIG::debug         {             private static var logger:Logger = new Logger();               private var log:ILogger;         }           public function Game()         {             CONFIG::debug             {              ...

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

22. Ts简单对象池 [ 85%]

...好,否则使用时会出问题 */   export default class PoolManager { static _instance:any; public m_ObjectPoolDic:{[key:number]:QueueT<Laya.MeshSprite3D>}={} constructor() { } static getInstance() { return this._instance || (this._instance = new PoolManager()) }  //初始化 //加载到...

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

23. spine适配版微信开发者平台报错 [ 85%]

...邀请: 与内容相关的链接 提交 3 个回复 northTg 赞同来自: static init(par: fgui.GComponent) { this.parent = par; this.aniPath = "res/sk/pipei.skel"; this.index = -1; this.startFun(); } static startFun() { if (!this.templet) this.templet = new Laya.SpineTemplet(Laya.SpineVersion.v3_8)...

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

24. 仅在Android微信小游戏下图片错乱 [ 84%]

仅在Android微信小游戏下图片错乱 static preLoadPublicAssets(){ this.sAssetList = Loader.getRes("file_list.json") Laya.loader.load("res/ui/share@atlas0.png", Handler.create(this, this.onLoaded), null, Loader.IMAGE, 1, true, null, true) } static onLoaded(res){ console.log("public assets in...

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

25. iOS环境浏览器使用mask黑屏 [ 84%]

...提供临时处理方法: 1. 改源码: 修改 WebGLContext.ts 的  static setBlendFunc 把  if (force || sFactor !== WebGLContext._sFactor || dFactor !== WebGLContext._dFactor) { 改成 if(true){   2. 改laya.core.js 找到 869行左右的 static setBlendFunc(gl, sFactor, dFactor)...

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

26. ProtocolBuffer通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 82%]

...快捷指令即可。 示例代码如下: "scripts": { "pbjs": "pbjs -t static-module -w commonjs -o ./src/libs/protobuf/protobuf.js ./src/libs/protobuf/protobuf.proto", "pbts": "pbts -o ./src/libs/protobuf/protobuf.d.ts ./src/libs/protobuf/protobuf.js" }, 效果如图1-2所示: pbjs指令参数...

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

27. List 组件做的手风琴Demo [ 82%]

...  }     /** * 创建BOX */ class Item extends Laya.Box{     public static WID:number =100;     public static HEI:number =30;     constructor(){         super()         this.size(Item.WID,Item.HEI);         var img1 =new Laya.Image("bg0.png");         v...

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

28. 获取位置信息 · LayaAir3.3 · 引擎文档 · LAYABOX [ 82%]

...ENIED、Geolocation.POSITION_UNAVAILABLE和Geolocation.TIMEOUT之一。 */ static getCurrentPosition(onSuccess: Handler, onError: Handler = null): void { Geolocation.navigator.geolocation.getCurrentPosition(function (pos: any): void { Geolocation.position.setPosition(pos); onSuccess.runWith(Geolocat...

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

29. 要做一个方形倒计时,请问该怎么实现,不知道该怎么做 [ 82%]

...import laya.maths.Rectangle; public class CdSprite extends Sprite { public static const START:int = -90; public static const COLOR:String = "#000000"; private var r:Number = BarCell.WID / Math.SQRT2; private var rect:Rectangle = new Rectangle(0,0,BarCell.WID,BarCell.WID); private var pos:int = BarCe...

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

30. laya接入fairyGUI的时候资源加载方式? [ 81%]

...jhj * QQ:8510001 * 2019-11-25 */ export default class FguiResMgr { private static _instance: FguiResMgr; public static get instance(): FguiResMgr { if (!this._instance) this._instance = new FguiResMgr(); return this._instance; } /**加载优先级,越小越优先,最小为0 */ private priority: ...

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