大约有 204 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0044 秒)
...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
...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
...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
... sp = new Sprite(); Laya.stage.addChild(sp); //画矩形 sp.graphics.drawRect(20, 20, 100, 50, "#ffff00"); } } } ``` 代码运行效果: ![图片...
来源: Laya2.0_文档 发布时间: 20210715
...的链接 提交 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
... 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
...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
...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
...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
...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