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

大约有 632 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0040 秒)

31. 区块地图-PerspectiveWall [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.bgColor = "#232628"; createMap(); })(); function createMap() { tiledMap = new TiledMap(); tiledMap.createMap("../../res/tiledMap/perspective_walls.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), null); } })()...

来源: Laya_示例 发布时间: 20241118

32. UI-Image [ 84%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Image = Laya.Image; let dialog = new Image("res/ui/dialog (3).png"); Laya.stage.addChild(dialog); dialog.pos(165, 62.5); } } new UI_Image();module laya { impor...

来源: Laya2.0_示例 发布时间: 20241118

33. textInput的单行输入&多行输入(TypeScript-LayaAir基础篇(TS)-文本) [ 84%]

....alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; this.createSingleInput(); this.createMultiInput(); } private createSingleInput(): void { var inputText: Input = new Input(); inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1...

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

34. 屏幕适配-缩放-No Border [ 84%]

...tage.ALIGN_CENTER; Laya.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.upda...

来源: Laya2.0_示例 发布时间: 20241118

35. 屏幕适配-缩放-No Scale [ 84%]

...Stage.ALIGN_CENTER; Laya.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.upda...

来源: Laya2.0_示例 发布时间: 20241118

36. 屏幕适配-缩放-Extract Fit [ 83%]

...tage.ALIGN_CENTER; Laya.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.upda...

来源: Laya2.0_示例 发布时间: 20241118

37. 屏幕适配-缩放-Show All [ 83%]

...Stage.ALIGN_CENTER; Laya.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.upda...

来源: Laya2.0_示例 发布时间: 20241118

38. 区块地图-PerspectiveWall [ 83%]

...Stage.ALIGN_CENTER; Laya.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.create...

来源: Laya2.0_示例 发布时间: 20241118

39. 区块地图-带动画的地图 [ 83%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createMap(); })(); function createMap() { tiledMap = new TiledMap(); tiledMap.createMap("../../res/tiledMap/orthogonal-test-movelayer.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), null)...

来源: Laya_示例 发布时间: 20241118

40. textInput的单行输入&多行输入(JavaScript-LayaAir基础篇(JS)-文本) [ 83%]

...as Laya.init(640,800,Laya.WebGL); //设置画布的背景颜色 Laya.stage.bgColor = "#efefef"; Text_InputSingleline(); Text_InputMultiline(); function Text_InputSingleline(){ var textInput = new Laya.TextInput("单行输入");//创建一个 TextInput 类的实例对象 textInput 。 textInput.wordW...

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