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

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

251. 图集打包后使用Texture不显示啊 [ 76%]

...入口 import Loader = Laya.Loader; import Texture = Laya.Texture; import Handler = Laya.Handler; class GameMain{ constructor() { Laya.init(1080,1321); //设置适配模式 Laya.stage.scaleMode = "showall"; //设置剧中对齐 Laya.stage.alignH = "center"; //设置横竖屏 //Laya.stage.screenMode ...

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

252. VScrollBar属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 76%]

...Bar; var ScrollBar = Laya.ScrollBar; var VScrollBar = Laya.VScrollBar; var Handler = Laya.Handler; var WebGL = Laya.WebGL; /***垂直滚动条资源**/ this.skins = ["res/ui/vscroll.png", "res/ui/vscroll$bar.png", "res/ui/vscroll$down.png", "res/ui/vscroll$up.png"]; // 不支持WebGL时自动切换...

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

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

...yOpenDataContext 5.主域这边代码: import Label = Laya.Label; import Handler = Laya.Handler; import Loader = Laya.Loader;  class GameBootstrap{      public constructor(){         this.init();     }      private init():void{         //初始化微信小游戏   ...

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

254. 设置滤镜(ActionScript-LayaAir基础篇(AS3)-位图) [ 76%]

...import laya.resource.Texture; import laya.utils.Browser; import laya.utils.Handler; import laya.webgl.WebGL; public class Main { private const ApePath:String = "res/img/monkey1.png"; private var apeTexture:Texture; public function Main() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser....

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

255. 用LayaAir引擎解析Tiled Map地图(ActionScript-2D进阶篇(AS3)-扩展模块) [ 76%]

... import laya.maths.Rectangle; import laya.utils.Browser; import laya.utils.Handler; import laya.webgl.WebGL; public class TiledMapDemo { private var tMap:TiledMap; public function TiledMapDemo() { //初始化舞台 Laya.init(Browser.width, Browser.height, WebGL); //创建TiledMap实例 tMap = new Ti...

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

256. 官方文档里的位图字体的制作与使用JS 跑不通 以及 文档的几个问题 [ 76%]

...ng文件同名this.mBitmapFont.loadFont("res/bitmapFont/test.fnt",new Laya.Handler(this,onLoaded)); c.将字体文件放到 LayaAir IDE 项目的资源目录中(laya/assets/) d.   6.完整代码如下所示:   //初始化引擎Laya.init(550,400);//自定义文件名称this.mFontName = "diyFo...

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

257. 请问一下,怎么将下面这段AS3代码翻译成LayaAir的API [ 76%]

...x; import laya.net.Loader; import laya.resource.Texture; import laya.utils.Handler; public class LayaAirDemo { public function LayaAirDemo() { Laya.init(700,600); Laya.loader.load('res/apes/monkey2.png',Handler.create(this,onLoaded)) } private function onLoaded():void { var texture:Texture=Loader.ge...

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

258. graphics 问题 [ 76%]

... = Laya.Stage; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = ...

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

259. ComboBox属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 76%]

...pt (function() { var Stage = Laya.Stage; var ComboBox = Laya.ComboBox; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var skin = "res/ui/combobox.png"; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH =...

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

260. 分享个资源加载的方法,类似白鹭的加载方式 [ 76%]

...n(srcName: string,caller: any){ Laya.loader.load("res/" + srcName,new Laya.Handler(caller,function(arg: any){ if(arg){ RES.groups = arg.groups; RES.resources = arg.resources; RES.getInstance().event(RES.ONLOADEDRESJSON,arg); }else{ RES.getInstance().event(RES.ONLOADERRORRESJSON,arg); } })) } /** * g...

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