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

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

111. 关于新手引导 [ 67%]

...ar maskArea:Sprite = new Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.addChild(maskArea); //绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 interactionArea = new Sprite(); //设置...

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

112. sound manager在MOUSE_OVER事件中无法播放 [ 67%]

...       button.size(w, h);             button.graphics.drawRect(0, 0, w, h, "#FF7F50");             button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center");             Laya.stage.addChild(button);             r...

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

113. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 66%]

...tePanel():void { let panel:Laya.Sprite = new Laya.Sprite(); panel.graphics.drawRect(0,100,100,20,0xffffff); this.addChild(panel); let box:laya.physics.BoxCollider = panel.addComponent(laya.physics.BoxCollider); box.height = 20; box.width = 100; let rigid:Laya.RigidBody = panel.addComponent(Laya.Rigi...

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

114. 为何对sp的监听事件没有反应呢? [ 66%]

...件没有反应呢? var xxx:Laya.Sprite = new Laya.Sprite(); xxx.graphics.drawRect(0,0,100, 100,"#ffffff"); xxx.size(100, 100); xxx.mouseEnabled = true; xxx.x = (Laya.stage.width - xxx.width) / 2; xxx.y = (Laya.stage.height - xxx.height) / 2; Laya.stage.addChild(xxx); xxx.on(Laya.Event.CLICK, this, ...

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

115. 移动Sprite时,边缘闪烁 [ 66%]

... function tankSprite() { this.speed_x = 3; this.speed_y = 4; this.graphics.drawRect(0, 0, 90, 90, '#aabbcc', '#bbccdd', 1); Laya.stage.addChild(this); var lastTimestamp = 0; var count = 0; var totale = 0; Laya.timer.frameLoop(1, this, function test() { var deltaTime = new Date().getTime() - lastTime...

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

116. 版本号:2.0.2 beta, 在sound文件夹下音乐播放不了,放入到res文件夹下可播放 [ 66%]

...0;  var button: Sprite = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; }  //private musicString:string = "./sounds/心跳的证明.mp3"; pr...

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

117. 关于js继承类class的参数问题 [ 66%]

...m.__super.call(this);//初始化父类      *         this.graphics.drawRect(0, 0, 100, 20, "#ff0000");      *         var label = new laya.ui.Label();//创建一个 Label 类的实例对象 label 。      *         label.text = "100000";//设置 label 的文本内容。     ...

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

118. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 65%]

...tePanel():void { let panel:Laya.Sprite = new Laya.Sprite(); panel.graphics.drawRect(0,100,100,20,0xffffff); this.addChild(panel); let box:laya.physics.BoxCollider = panel.addComponent(laya.physics.BoxCollider); box.height = 20; box.width = 100; let rigid:Laya.RigidBody = panel.addComponent(Laya.Rigi...

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

119. 关于mouseover的问题 [ 65%]

...=100;             sp.height=100;             sp.graphics.drawRect(0,0,100,100,"#ff0000");             sp.on(Event.MOUSE_OVER,this,onMouse);             sp.on(Event.MOUSE_OUT,this,onMouse);             Laya.stage.addChild(sp);             Stat.sho...

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

120. flag的问题 [ 65%]

...":"#FFA500"         c.graphics.clear();         c.graphics.drawRect(50, 50, 300, 100, color);         Laya.stage.addChild(c);     } })();   2017-05-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 ...

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