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

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

31. 【简单跑酷--JS版】---Lv.6 终篇 [ 72%]

...类型 Hp.HP_TYPE_SPEED = "hp_type_speed"; //Hp Laya.class(Hp,"Hp", laya.display.Sprite); var _proto = Hp.prototype; _proto.init = function(type){ this.width = 180; this.height = 21; var texture1 = Laya.loader.getRes("res/hp_bg.png"); var texture2; switch (type) { case Hp.HP_TYPE_ENERGY: texture2 = ...

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

32. 分享,扩展Laya.Text组件实现简单的富文本 [ 72%]

...s.bold ? "bold " : "") + this.fontSize + "px " + (Browser.onIPhone ? (laya.display.Text._fontFamilyMap[this.font] || this.font) : this.font); Browser.context.font = ctxFont; var padding = this.padding; var startX = padding[3]; var textAlgin = "left"; var lineHeight = this.leading + this._charSize.he...

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

33. 打包之后TEXT可以显示但是 加载其他资源时白屏 [ 72%]

...andler.create(this,graphicsImg)); function graphicsImg(){ var s = new laya.display.Sprite(); s.graphics.drawTexture(Laya.loader.getRes("../res/image/bg.png"),0,0);  Laya.stage.addChild(s); } 新建一个工程 這样写打包之后会白屏 2018-08-08 0 8 分享 微博 QZONE 微信 为什么被折...

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

34. 关于event中只读属性touches,问题,求解 [ 71%]

...nt中只读属性touches,问题,求解 主类: package { import laya.display.Text; import laya.events.Event; import laya.webgl.WebGL; public class DemoTouch { public function DemoTouch() { Laya.init(800, 600, WebGL); Laya.stage.bgColor = "#232628"; var txt:Text = new Text(); txt.text = "hello"...

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

35. 2.0字体比较小的时候,某些字显示不全 [ 69%]

...字显示不全 代码demopackage { import laya.webgl.WebGL; import laya.display.Text; public class LayaSample { public function LayaSample() { //初始化引擎 Laya.init(480, 640,WebGL); Laya.stage.bgColor = "#FFFF33"; var txt:Text = new Text(); //给文本的text属性赋值 txt.text = "gggggqqqq...

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

36. 阿拉伯语言的显示都是反的 [ 69%]

...    style = Browser.canvas.source.style;             style.display = "none";             style.position = "absolute";             style.direction = "rtl";             //Browser.document.body.style.direction = "rtl";             Render._...

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

37. Font.defaultFont设置默认字体无效 [ 68%]

...defaultFont = "SimHei" Laya.init(600, 1200, WebGL); var txtName = new laya.display.Text(); txtName.fontSize = 20; txtName.color = "#ffffff"; txtName.align = "center"; txtName.stroke = 2; txtName.text = "设置全局字体无效"; Laya.stage.addChild(txtName);   2017-12-27 添加评论 免费帖 -->...

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

38. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 67%]

...oor 是一个显示对象 继承此 Sprite Laya.class(Floor, "Floor", laya.display.Sprite); var _proto = Floor.prototype; /** * type int 1->地板默认宽度 other->随机宽度 */ _proto.init = function(type){ this.maxRight = 0; //如果不开启autoSize 父容器的宽度和高度无法获...

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

39. JSON文件加载成功后,怎么解析成Object对象 [ 66%]

...代码(文档类): --------------------------------package { import laya.display.Text; import laya.net.Loader; import laya.utils.Handler; /** * ... * @author OttoChen */ public class TestMain { private var txt:Text = null; public function TestMain() { Laya.init(800, 800); txt = new Text(); txt.mou...

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

40. mac下用FB打包发布测试页面,chrome浏览器看不到预期显示文字 [ 66%]

...s variable is not defined.   代码如下: package {     import laya.display.Text;     public class LayaAirTest     {         public function LayaAirTest()         {             Laya.init(600, 300);             var txt:Text   = new Text();            ...

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