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

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

71. LayaAir引擎与原生Flash的差异文档说明! [ 74%]

...nFill(0xFFFF00); sp.graphics.drawRect(0,0,200,200); sp.graphics.endFill(); addChild(sp); var mask:Sprite=new Sprite(); mask.graphics.beginFill(0xFF0000); mask.graphics.drawCircle(0,0,50); mask.graphics.endFill(); sp.mask=mask2、动态遮罩 var sp:Sprite=new Sprite(); sp.graphics.beginFill(0xFFFF00...

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

72. 重写X Y在android studio里运行会变成00 [ 74%]

...prite的对象 比如 XSprite extends Sprite 3 new出这个对象 将对象addChild到TestUI里 this.addChild(xSprite); 4 然后设置xSprite.x = 100; xSprite.y = 200; 5 然后再XSprite这个类里将XY复写比如 public set x(val: number) { this._x = val; } public get x(): number { return this._x...

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

73. Tween.to 执行失败 [ 74%]

...tch(dir){ case "up": hero_p1.roleAni.play(0,true,"p1_walk_up"); Laya.stage.addChild(hero_p1.roleAni); break ; case "down": hero_p1.roleAni.play(0,true,"p1_walk_down"); Laya.stage.addChild(hero_p1.roleAni); break ; case "left": hero_p1.roleAni.play(0,true,"p1_walk_left"); Laya.stage.addChild(hero_p1....

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

74. 绘制矩形与圆角矩形(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 74%]

...         sp = new Sprite();             Laya.stage.addChild(sp);             //画矩形             sp.graphics.drawRect(20, 20, 100, 50, "#ffff00");                        }     } } ``` 代码运行效果: ​ ![图片...

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

75. 怎么实时获取相机的xyz [ 73%]

...的链接 提交 2 个回复 wudi199553 赞同来自: var camera = scene.addChild(new Laya.Camera(0, 0.1, 1000)); camera.transform.translate(new Laya.Vector3(5, -10, 500)); 2017-12-18 0 1 分享 微博 QZONE 微信 wudi199553 赞同来自: https://ask.layabox.com/question/7565 2017-12-19 0 0 分享 ...

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

76. 绘制矩形与圆角矩形(TypeScript-LayaAir基础篇(TS)-矢量图) [ 73%]

...      this.sp = new Sprite();             Laya.stage.addChild(this.sp);            //画矩形             this.sp.graphics.drawRect(20, 20, 100, 50, "#ffff00");         }     } } new laya.Sprite_DrawShapes(); ``` 代码运行效果: ​...

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

77. 请问如何使我的自定义类UIDropBox继承Laya.Sprite? [ 73%]

...tTextFeild(); this.txt.y = 50; this.txt.text = 'aasassa'; console.log(this.addChild);//undefined console.log(this._super);//undefined this.addChild(this.txt); } Laya.class(UIDropBox, "UIDropBox", Sprite); UIDropBox.prototype = { getTextFeild: function () { var text = new Text(); text.overflow = Text...

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

78. 怎么获取手机相册内容 [ 73%]

...oaded():void { var btn:Button = new Button("res/button-1.png"); Laya.stage.addChild(btn); //创建隐藏的file并且把它和按钮对齐。达到位置一致,这里我们默认在0点位置; var file:Object = Browser.document.createElement("input"); //设置file的样式 file.style="filter:alp...

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

79. 打包后启动游戏后报错 [ 73%]

...raphics.drawRect(0,0,300,300,"#ffffff"); s.graphics.setAlpha(1); addChild(s); var img:Image = new Image("a.png"); s.addChild(img); //方案二: var s:Sprite = new Sprite(); s.graphics.alpha(0.3); s.graphics.drawRect(0,0,300,300,"#ffffff"); s.graphics.alpha(1); addChild(...

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

80. 如何做一个心形的进度条? [ 72%]

...818760256 赞同来自: var view = new testUI(); view.pos(0,0); Laya.stage.addChild(view); view.fbar.y = 24;//这里设置没效果。。 Test.zip 2017-11-23 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 158187...

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