大约有 1,491 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0057 秒)
Laya_社区(917) Laya2.0_文档(193) Laya_示例(125) Laya2.0_示例(101) Laya3.0_api(79) Laya3.0_文档(72) laya_api(2) Laya2.0_api(2)
...d(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); let vhvt: ViewHeadViewTest = new ViewHeadViewTest(); //testUI.addChildAt(vhvt, 0); testUI.addChild(vhvt); vhvt.on(laya.events.Event.CLICK, this, (event: Laya.Event) => { console.log("为什么这里不进...
来源: Laya_社区 发布时间: 20170822
... fish.scoreItem.y = fish.getBox().y - fish.scoreItem.height; this.scoreBox.addChild(fish.scoreItem); fish.scoreGold = new Laya.Image(); fish.scoreGold.skin = "assets/ui_imgs/icon_00312.png"; fish.scoreGold.x = fish.scoreItem.x; fish.scoreGold.y = fish.scoreItem.y; fish.scoreGold.scaleX = 0.6; fish.s...
来源: Laya_社区 发布时间: 20180517
...- ape.width) / 2; ape.y = (Laya.stage.height - ape.height) / 2; Laya.stage.addChild(ape); applayFilter(ape); } function applayFilter(ape) { var blurFilter = new BlurFilter(); blurFilter.strength = 5; ape.filters = [blurFilter]; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.St...
来源: Laya_示例 发布时间: 20251209
....interval = 150; this.animation.play(0, true, ActionType.MOVE_RIGHT); this.addChild(this.animation); 由于动画不能设置锚点,我想设置动画图片宽度/2为轴心点pivotX坐标让图片居中,有什么方法可以自动获得到动画图片宽度吗? 我是想设置动画完全...
来源: Laya_社区 发布时间: 20170119
...i/BG/play-bg.png", 0, 0, 720, 5120); //把背景图显示在容器内 this.addChild(this.bg1); //创建背景2 this.bg2 = new Laya.Sprite(); //加载并显示背景图 this.bg2.loadImage("ui/BG/play-bg.png", 0, 0, 720, 5120); //更改背景2的位置,放在背景1的上边 this.bg1.pos(0, -3840); ...
来源: Laya_社区 发布时间: 20181105
...ke(): void { let sprite = new Laya.Sprite(); // 添加到舞台 Laya.stage.addChild(sprite); } 3.2 显示图片 图片的显示是游戏开发的基础,Sprite类中用于显示图片是 Sprite.loadImage 和 Sprite.texture。 3.2.1 loadImage /** * <p>加载并显示一个图片。相当于加...
来源: Laya3.0_文档 发布时间: 20251010
...te(); this.RoleMap.size(Laya.stage.width, Laya.stage.height/2); Laya.stage.addChild(this.RoleMap); this.RoleMap.addChild(this.Role); this.Role.pivot(16,24);// 图片32x48 this.Role.pos(100, 200); Role.js基础代码: var Role = ( function ( _super ) { function Role () { Role._super.call(this); ...
来源: Laya_社区 发布时间: 20181012
...3D场景----------------------- this.scene = new Laya.Scene(); Laya.stage.addChild(this.scene); //方法一:直接异步加载 // var mesh:Laya.Mesh = Laya.Mesh.load("LayaScene_01/Assets/model/loveScene_jianzhu.lm"); // var meshSprite3D:Laya.MeshSprite3D = new Laya.MeshSprite3D(mesh); //方法二...
来源: Laya_社区 发布时间: 20171109
...台上添加了好几个节点,用于存放绘图,结构是 this.box.addChild(this.data); Laya.stage.addChild(this.box) 其中鼠标事件MOUSE_DOWN点击需要获取的是this.data的内容 this.data是由一块画布,几个点构成,我用循环函数创建几个点,并且设置名称p...
来源: Laya_社区 发布时间: 20171117
TextInput 在panle里滚动后输入位置错乱,求解 在panel上addchild一个TextInput,当手指滑动开始坐标位于TextInput上,则会出现panle滑动同时弹出手机键盘,但这个时候输入文字的位置并不在TextInput上了。 附件 : --> 2018-06-12 添加评论 ...
来源: Laya_社区 发布时间: 20180612