大约有 117 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0024 秒)
...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_示例 发布时间: 20241117
...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.createText(); this.start(); } start() { const Sprite = Laya.Sprite; for (var i = 0; i w) { stars[i].x = stars[i].x - w; } else if (stars[i].x h) { stars[i].y = stars[i].y - h; } else if (stars[i].y = []; private w:number...
来源: Laya2.0_示例 发布时间: 20241117
...ya.stage.scaleMode = Stage.SCALE_NOBORDER; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...
来源: Laya2.0_示例 发布时间: 20241117
...aya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...
来源: Laya2.0_示例 发布时间: 20241117
...ya.stage.scaleMode = Stage.SCALE_EXACTFIT; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...
来源: Laya2.0_示例 发布时间: 20241117
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...
来源: Laya2.0_示例 发布时间: 20241117
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.connect(); } connect() { const Socket = Laya.Socket, Event = Laya.Event; socket = new Socket(); //socket.connect("echo.websocket.org", 80); socket.connectByUrl("ws://echo.websocket.org:80"); output = socket.output; socke...
来源: Laya2.0_示例 发布时间: 20241117
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.showApe(); } showApe() { this.ape = new Laya.Sprite(); Laya.stage.addChild(this.ape); this.ape.loadImage("res/apes/monkey2.png"); this.ape.pivot(55, 72); // this.ape.pos( Laya.stage.width / 2, Laya.stage.height / 2); thi...
来源: Laya2.0_示例 发布时间: 20241117
...fighter.png", "res/legend/map.jpg"]; Laya.loader.load(urls, Handler.create(this, this.onAssetLoaded), Handler.create(this, this.onLoading, null, false), Loader.TEXT); // 侦听加载失败 Laya.loader.on(Event.ERROR, this, this.onError); } onAssetLoaded(texture) { // 使用texture console.log("加...
来源: Laya2.0_示例 发布时间: 20241117
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Laya.Event.CLICK, this, this.onStageClick); } createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/per...
来源: Laya2.0_示例 发布时间: 20241117