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

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

41. sprite做的按钮点击无反应? [ 84%]

...ar h:int = 40; var btn:Sprite = new Sprite(); btn.size(w, h); btn.graphics.drawRect((stageWd - w) * 0.5, (stageHt - h) * 0.5-50, w, h, "#FF7F50"); btn.graphics.fillText("确 定", (stageWd) * 0.5 , (stageHt - h) * 0.5-43, "25px SimHei", "#FFFFFF", "center"); //dialog_mc.addChild(btn); Laya.stage.add...

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

42. 计时器-延迟执行 [ 83%]

...n(label) { var w = 300, h = 60; var button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } function onDecreaseAlpha1(e) { //移除鼠标单击事件 button1.off(Event....

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

43. 计时器-延迟执行 [ 83%]

...0; let button = new Sprite(); Laya.stage.addChild(button); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } onDecreaseAlpha1(e) { const Event = Laya.Event; //移除鼠标单击事件 t...

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

44. 新手引导在ios浏览器表现异常 [ 83%]

...   let sp = new Laya.Sprite();             sp.graphics.drawRect(0,0,Laya.stage.width,Laya.stage.height,"#FFFFFF");             Laya.stage.addChild(sp);              let guideView = new MazeGuideView();             guideView.zOrder = MazeC...

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

45. 透明区域点击问题 [ 82%]

...1 2、代码的写法: var sprite:Sprite = new Sprite(); sprite.graphics.drawRect(100,100,100,100,"#ff9900"); var hitarea:HitArea = new HitArea(); var graphics:Graphics = new Graphics(); graphics.drawRect(100,100,100,100,"#ff9900"); hitarea.hit = graphics; sprite.hitArea = hitarea; 2017-04-28 0 0 ...

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

46. 鼠标交互-拖动 [ 82%]

...dthLimit, dragHeightLimit); //画出拖动限制区域 Laya.stage.graphics.drawRect( dragRegion.x, dragRegion.y, dragRegion.width, dragRegion.height, null, "#FFFFFF", 2); } onStartDrag(e) { //鼠标按下开始拖拽(设置了拖动区域和超界弹回的滑动效果) this.ape.startDrag(dragRegion,...

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

47. 混合模式-Lighter [ 82%]

...BgColor(); } renderBg() { Laya.stage.graphics.clear(); Laya.stage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, this.getHexColorString()); } getHexColorString() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChannels.g = 0; //obj.g = Math.floor(obj.g); bgC...

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

48. 多重遮罩显示异常 [ 82%]

...{ super(); this.init(); } init() { let bg = new Laya.Sprite(); bg.graphics.drawRect(0, 0, 500, 500, '#aaa'); this.addChild(bg); this.panel = new Laya.Panel(); this.panel.width = 500; this.panel.height = 500; this.panel.vScrollBarSkin = ''; this.panel.hScrollBarSkin = ''; this.addChild(this.panel); l...

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

49. 鼠标交互-拖动 [ 82%]

...dthLimit, dragHeightLimit); //画出拖动限制区域 Laya.stage.graphics.drawRect( dragRegion.x, dragRegion.y, dragRegion.width, dragRegion.height, null, "#FFFFFF", 2); } function onStartDrag(e) { //鼠标按下开始拖拽(设置了拖动区域和超界弹回的滑动效果) ape.startDrag(dragReg...

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

50. 混合模式-Lighter [ 82%]

...; } function renderBg() { Laya.stage.graphics.clear(); Laya.stage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, getHexColorString()); } function getHexColorString() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChannels.g = 0; //obj.g = Math.floor(obj.g);...

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