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

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

61. 请问老师为什么我按照官网的实例播放音频没反应呢? [ 79%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { var gap = 10; //创建一个Sprite充当音效播放按钮 var soundButton = createButton("播放音效"); soundButto...

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

62. DOM元素-表单输入 [ 79%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#fff"; this.form = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.h...

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

63. Sprite-屏幕截图 [ 79%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.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...

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

64. Laya.Event.RESIZE 栈溢出问题 [ 78%]

...aleMode = 'full'; Laya.stage.screenMode = 'vertical'; Laya.stage.alignH = 'center'; Laya.stage.bgColor = '#ff00ff'; Laya.Stat.show(0, 0); Laya.stage.on(Laya.Event.RESIZE, Laya.stage, ()=>{ console.log(111) Laya.stage.width = 600 * Laya.Browser.pixelRatio; }) } } new GameMain(); 2018-05-25 添加...

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

65. LAYAAIR加载SWF无线循环 [ 78%]

... Stage.ALIGN_MIDDLE;         //  Laya.stage.alignH = Stage.ALIGN_CENTER;             Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL;             //设置水平对齐             Laya.stage.alignH = "center";             //设置垂直对齐 ...

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

66. 2D物理-桥 [ 78%]

...lignV = Laya.Stage.ALIGN_MIDDLE; Laya.Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBridge(); this.eventListener(); } createBridge() { const startPosX = 250, startPosY = 450; let ground = new Laya...

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

67. 超出文本区域的处理&滚动文本(TypeScript-LayaAir基础篇(TS)-文本) [ 78%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createTexts(); } private createTexts(): void { var t1: Text = this.createText(); t1.overflow = Text.VISIBLE; t1.pos(10, 10); var t2: Tex...

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

68. 超出文本区域的处理&滚动文本(JavaScript-LayaAir基础篇(JS)-文本) [ 77%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createTexts(); })(); function createTexts() { var t1 = createText(); t1.overflow = Text.VISIBLE; t1.pos(10, 10); var t2 = createText(); t2.ov...

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

69. 网络和格式-Socket [ 77%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.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", 8...

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

70. 区块地图-PerspectiveWall [ 76%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = 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....

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