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

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

101. 2.0label不改变文本内容,label颜色无法直接改变,1.0可以 [ 89%]

...的不同,label才会改变颜色 开启stroke就会出现这种情况   this.label = new Label();             this.label.text = "王小二的摊位";             this.label.fontSize = 15;             this.label.color = "#7CFC00";             this.lab...

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

102. tween对Text的缩放,为何会抖动呢? [ 88%]

...接 提交 4 个回复 135*****133 赞同来自: 找到解决办法了: this.txt.cacheAs = "normal";//或者设置bitmap皆可解决抖动问题 2020-04-10 0 0 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 这个抖动是bug,敬请期待后续版本修复 2020-04-10 0 0 分享 微博 QZO...

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

103. 音频-播放演示 [ 88%]

...undButton.y; Laya.stage.addChild(musicButton); soundButton.on(Event.CLICK, this, onPlaySound); musicButton.on(Event.CLICK, this, onPlayMusic); } function createButton(label) { var w = 110; var h = 40; var button = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); butt...

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

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

... txt.color = "#ffffff"; Laya.stage.addChild(txt); txt.on(Event.MOUSE_DOWN, this, startScrollText); } /* 开始滚动文本 */ function startScrollText(e) { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finishScrollText)...

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

105. 屏幕适配-自动竖屏 [ 88%]

....stage.screenMode = Stage.SCREEN_VERTICAL; Laya.stage.bgColor = "#232628"; this.showText(); } showText() { const Text = Laya.Text; let text = new Text(); text.text = "Orientation-Portrait"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; te...

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

106. 屏幕适配-自动横屏 [ 88%]

...tage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; this.showText(); } showText() { const Text = Laya.Text; let text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; t...

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

107. sprite点击事件 位置便宜 [ 88%]

... Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, this, mouseHandler); rect.on(Event...

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

108. 针对2.0.0 beta5 setLoadingPage 做增强 [ 88%]

...异步方法 */ export default class LoadPage { constructor(url = null) { this._loadScene = null if (url) this.preload(url) } /** * 预加载loading页面 * @param {String} url loading页面url */ async preload(url = 'loadingpage.scene') { if (this._loadScene && url === this._loadScene.url) ...

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

109. 获取动态更新的文本内容 [ 88%]

...用frameloop重复执行加载文本资源函数 1 Laya.stage.frameLoop(1,this,this.Repeat,null,true); 这是加载资源的函数内的代码 1 2 3 4 5 6 7 8 loadPosition():void{ /* let resArray:Array<any>=[ {url:"eyeimf.txt",type:Laya.Loader.TEXT} ] Laya.loader.load(resArray,Laya.Handler.cre...

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

110. UI言语包什么用 [ 87%]

...: 2017-08-21 19:45 浏览: 870 关注: 2 人 asdf131 • 2017-08-22 20:08 this.txtMapName.text = "地图:"+name; 用语言包的话的分两次赋值? this.txtMapName.text = "地图:"; this.txtMapName.text = this.txtMapName.text + name;

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