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

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

111. Sprite-切换纹理 [ 97%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.flag = true; Laya.loader.load([monkey1Str, monkey2Str], Laya.Handler.create(this, this.onAssetsLoaded)); } onAssetsLoaded() { monkey1Res = Laya.loader.getRes(monkey1Str), monkey2Res = Laya.loader.getRes(monkey2Str); this...

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

112. 性能测试-骨骼 [ 97%]

...e: Loader.IMAGE }, { url: mAniPath, type: Loader.BUFFER }], Handler.create(this, this.onAssetsLoaded)); } onAssetsLoaded() { const Loader = Laya.Loader, Templet = Laya.Templet, Event = Laya.Event; let tTexture = Loader.getRes(mTexturePath); let arraybuffer = Loader.getRes(mAniPath); mFactory = new T...

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

113. 骨骼动画进阶(TypeScript-2D进阶篇(TS)-动画进阶) [ 97%]

...ructor() { Laya.WebGL.enable(); Laya.init(1000, 900); //创建动画模板 this.templet = new Laya.Templet(); this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(Laya.Event.ERROR, this, this.onError); this.templet.loadAni("res/spine/goblins/goblins.sk"); } onError() { con...

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

114. 加载TiledMap 不显示 [ 97%]

...OWALL;         Laya.stage.bgColor = "#232628";          this.createMap();          Laya.stage.on("click", thisthis.onStageClick);     }      private createMap(): void {         this.tiledMap = new TiledMap();         this.tiledMap.create...

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

115. 网络请求添加headers后 post数据错误 [ 97%]

...加headers则正常  示例代码  var headers = [ 'C-Sign', sign ]; // this.caller = caller; this.callbackHandler = callback; // this.errcallback = errcallback; //this.http.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); this.http.once(Laya.Event.COMPLETE, this, this.onHttpRequestCom...

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

116. image在相应loaded的时候,无法正确获取高度 [ 97%]

...mic extends Laya.Image { matterBody: Matter.Body; constructor() { super(); this.on('start', this, this.init); } private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var createOption: any = { isStatic: false, }; this.matterBody = Matter.Bodies....

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

117. [LayaAirIDE 2.0]TextInput真机输入时显示蓝色字,求解 [ 97%]

...: string = ""; /** 输入框数组 */ private _arrInput: Laya.TextInput = [this.input_nickname, this.input_mobile, this.input_password, this.input_repassword]; /** 标签数组 */ private _arrLabel: Laya.Label = [this.lb_nickname, this.lb_mobile, this.lb_password, this.lb_repassword]; /** 验证标...

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

118. [LayaAir3]list.selectHandler [ 97%]

...选择的索引:" + index);         let checkBoxItem:Laya.CheckBox = this._list.getChildAt(index).getChildAt(0) as Laya.CheckBox;         if(checkBoxItem!=null){                         switch(checkBoxItem.name.trim()){                 case "0":{                ...

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

119. UI-Clip [ 97%]

...Laya.loader.load([buttonSkin, clipSkin, bgSkin], laya.utils.Handler.create(this, onSkinLoaded)); })(); function onSkinLoaded() { showBg(); createTimerAnimation(); showTotalSeconds(); createController(); } function showBg() { var bg = new Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg...

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

120. 鼠标交互-自定义事件 [ 97%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createSprite(); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; this.sp = new Sprite(); this.sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); this.sp.pivot(100, 100); this.sp....

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