大约有 12 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0070 秒)
...发语言、LayaAirIDE让项目开发更高效。let numLoaded = 0; class Loader_ProgressAndErrorHandle { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Event = Laya.Event, Loader = Laya.Loader; // 不支持WebGL时自...
来源: Laya2.0_示例 发布时间: 20241118
...、TypeScript三种开发语言、LayaAirIDE让项目开发更高效。var Loader = Laya.Loader; var Handler = Laya.Handler; var Event = Laya.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码...
来源: Laya2.0_示例 发布时间: 20200319
...e = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); Laya.loader.load(apePath, Handler.create(this, this.createApe)); } createApe() { const Sprite = Laya.Sprite, Event = Laya.Event; this.ape = new Sprite(); this.ape.loadImage(apePath); let texture = Laya.loader.getRes(apePath); this...
来源: Laya2.0_示例 发布时间: 20241118
... Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Loader = Laya.Loader; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCA...
来源: Laya2.0_示例 发布时间: 20241118
...e = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); Laya.loader.load(ApePath, Handler.create(this, this.setup)); } setup() { this.createApe(); this.showDragRegion(); } createApe() { const Sprite = Laya.Sprite, Event = Laya.Event; this.ape = new Sprite(); this.ape.loadImage(ApePath)...
来源: Laya2.0_示例 发布时间: 20241118
...let PathBg = "res/bg2.png", PathFly = "res/fighter/fighter.atlas"; class Loader_ClearTextureRes { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, B...
来源: Laya2.0_示例 发布时间: 20241118
...() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Loader = Laya.Loader, Stat = Laya.Stat; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.sca...
来源: Laya2.0_示例 发布时间: 20241118
...e.scaleMode = Stage.SCALE_FIXED_AUTO; Laya.stage.bgColor = "#232628"; Laya.loader.load(this.btnArr.concat("res/apes/monkey3.png"),Laya.Handler.create(this,this.onLoaded)); } createButton(skin, name, cb, index) { var btn = new Laya.Button(skin,name); Laya.stage.addChild(btn); btn.on(Laya.Event.CLICK,...
来源: Laya2.0_示例 发布时间: 20241118
...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // 创建罗盘 this.createCompass(); // 创建方位指示器 this.createDirectionIndicator(); //...
来源: Laya2.0_示例 发布时间: 20241118
...tage.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.ape = new Laya.Sprite(...
来源: Laya2.0_示例 发布时间: 20241118