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

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

211. LayaAir引擎解析Tiled Map地图(JavaScript-2D进阶篇(JS)-扩展模块) [ 64%]

...pLoaded() this.tMap.createMap("res/TiledMap/orthogonal.json",viewRect,Laya.Handler.create(this,onMapLoaded)); function onMapLoaded(){ //将原地图放大2倍 this.tMap.scale = 2; } ``` 运行效果如图8所示。 ![图8](img/8.png) (图8) #### 2.2.2 设置地图缩放的中心点 很明显,图8...

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

212. List选中项下滚会变 [ 64%]

...this.sList.selectEnable = true;//列表项是否可选 // this.sList.selectHandler = Laya.Handler.create(this,this.onSelect,null,false); this.sList.mouseHandler = new Laya.Handler(this,this.onMouse);//鼠标事件响应 } Laya.class(ServerListView,"ServerListView",_super); var _proto_ = ServerListVi...

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

213. list点击label保留一种状态 [ 64%]

...array = data; record_slide_list.selectEnable=true; record_slide_list.selectHandler = new Handler(this, onSelect,[record_slide_list]); record_slide_list.renderHandler = new Handler(this, onRender); function onRender(item,index){ var dataIndex = data[index]; var label = item.getChildByName('lab'); if(...

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

214. 位图字体的制作与使(JavaScript-LayaAir基础篇(JS)-文本) [ 64%]

...保证fnt与png文件同名 mBitmapFont.loadFont("res/test.fnt",new Laya.Handler(this,onLoaded)); function onLoaded(){ init(); } function init(){ //如果位图字体中,没放空格,最好设置一个空格宽度 mBitmapFont.setSpaceWidth(10); Laya.Text.registerBitmapFont(mFontName,mBitmapFont)...

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

215. [LayaAirIDE3]VBox布局组件没有中间居中的选项 [ 64%]

...码也被更改了 为什么官网例子里,UI组件的事件都new Handler,而资源加载Handler.create() 问题状态 最新活动: 2025-08-16 12:20 浏览: 356 关注: 3 人 layabox • 2025-08-15 14:45 你不能把宽高全都是全屏呀,都全屏了怎么布局?我们优化一...

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

216. Oppo加载.ls资源错误 [ 64%]

...s资源错误 Laya.loader.create("res/scenes/LayaScene_game/game.ls", Laya.Handler.create(this, () => { let gameScene = Laya.loader.getRes("res/scenes/LayaScene_game/game.ls") as Laya.Scene; Laya.stage.addChild(gameScene); }, null), Laya.Handler.create(this, (progress) => { console.log("当前...

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

217. LayaAir引擎解析Tiled Map地图(TypeScript-2D进阶篇(TS)-扩展模块) [ 64%]

...pLoaded() this.tMap.createMap("res/TiledMap/orthogonal.json",viewRect,Laya.Handler.create(this,this.onMapLoaded)); } private onMapLoaded():void{ //将原地图放大2倍 this.tMap.scale = 2; } } new GameMain(); ``` 运行效果如图8所示。 ![图8](img/8.png) (图8) #### 2.2.2 设置地图缩放...

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

218. drawTexture的matrix参数是怎么[ 63%]

...据子节点对象,获取子节点的索引位置。参数是什么 Laya.Handler.create 加载图片回调参数问题 Dispather.event参数传的是数组,为什么收到的参数却是个int类型? http 请求 once 的 回调参数,如何传递和接收? 点击按钮打开对话框的时...

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

219. 怎么获取手机相册内容 [ 63%]

...prite; import laya.ui.Button; import laya.utils.Browser; import laya.utils.Handler; public class Main { public function Main() { //初始化引擎 Laya.init(500,500);//初始化引擎 var skins:Array = [ "res/button-1.png" ]; Laya.loader.load(skins, Handler.create(this, onUIAssetsLoaded)); } public ...

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

220. 在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 [ 63%]

...le Main { import Sprite = Laya.Sprite import Texture = Laya.Texture import Handler = Laya.Handler export class MaskDemo { private Res: string; private img: Laya.Image; constructor() { //Laya.init(400, 640, Laya.WebGL); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" Laya.Stat.show() //资源...

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