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

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

321. Sprite用graphics绘制图形后,mouse_over触发scale显示有问题 [ 41%]

...aya.init(400, 400, Laya.WebGL); let res:any = []; res.push({url:"res/atlas/comp.atlas", type:Loader.ATLAS}); Laya.loader.load(res, Handler.create(null, this.__onLoaded)); } private __onLoaded(): void { Laya.stage.addChild(new Test()); } } new Entry();   Test.ts import Sprite = Laya.Sprite; class Te...

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

322. 报无法找到资源,未升级ide之前不报错 [ 40%]

...ame.jpg", type: Laya.Loader.IMAGE }, { url: "resources/UI/images/comp.atlas", type: Laya.Loader.ATLAS }, { url: "resources/UI/role/atlasAni2/139x.atlas", type: Laya.Loader.ATLAS }, { url: "scenes/Index.ls", type: Laya.Loader.HIERARCHY }, { url: "scenes/DsGameM...

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

323. 下拉选项框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 40%]

...ff"; this.combobox.selectedIndex = 1; this.combobox.scrollBarSkin = "atlas/comp/vscroll.png"; } } 二、通过代码创建ComboBox组件 在进行书写代码的时候,免不了通过代码控制UI,创建UI_ComboBox类,通过代码设定ComboBox相关的属性。下述示例演示了如何通...

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

324. 位图切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 40%]

...t;> 1, Laya.stage.height >> 1); // 位置 this.clip.skin = "atlas/comp/clip_num.png"; // 皮肤 this.clip.interval = 1000; // 切片动画的播放时间间隔1000毫秒 this.clip.clipX = 10; // 切片x轴数量 this.clip.autoPlay = true; // 动画自动播放 } } 二、通过代码创建Cl...

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

325. UI加载完成后无法获取控件的大小——超详细版问题 [ 40%]

...e.scaleMode = Stage.SCALE_FIXED_WIDTH; Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); console.log("myref-onloaded", testUI.myref....

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

326. 路径显示会添加DrawCall,每增加一条路径都会添加,有什么办法降DrawCall [ 39%]

...; } } private function TestScrollImage():Image{ var img:Image = new Image("comp/image.png"); img.scrollRect = new Rectangle(0,0,100,100); return img; } private function SetPathArr(ar:Array,path:Sprite):void{ var len:int = Math.floor(GetPathLen()/PATH_LEN)+2; var p:Image; for(var i:int = 0;i<len;i...

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

327. 射线形状检测shapeCastAll返回的检测结果只第一次有效 [ 39%]

...提示“再次点击后退键退出游戏”,如果去掉这个提示 comp下的button.png第一次点击进入另一个界面,再在这个界面下点击时点击事件不生效? 碰撞检测 和 sprite问题【js】 初次加载场景正确,返回后只加载第一个场景 viewportPointT...

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

328. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 39%]

...代码如下: var xhr = new XMLHttpRequest(); xhr.open("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = funct...

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

329. 输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 36%]

...this.txtin.overflow = "scroll"; //文本溢出 // this.txtin.skin = "atlas/comp/textinput.png"; //皮肤 this.txtin.bgColor = "#19a4f1"; //背景颜色 this.txtin.borderColor = "#f6ff03" //边框颜色 this.txtin.editable = true; //可编辑状态 // this.txtin.type = "password"; //输入框类型 /...

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

330. 微信小游戏利用开放域好友关系链做排行榜 [ 36%]

...  private beginLoad():void{         Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, this.onLoaded));     }      private onLoaded(): void {         console.log("onLoaded ......");         GameBootstrap.wxPostMessage({             cmd:1,  ...

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