大约有 10 项符合查询结果, 库内数据总量为 30,784 项。 (搜索耗时: 0.0026 秒)
...(Laya.Event.CLICK,this,cb); btn.size(147,55); btn.name = name; btn.right = 10; btn.top = index * (btn.height + 10); return btn; } onLoaded(){ for (let index = 0; index = ["res/button.png", "res/button.png", "res/button.png"]; private nameArr:Array = ["canvas截图","sprite截图","清理"]; private ...
来源: Laya2.0_示例 发布时间: 20241123
...et deepSkyblueRect = new Sprite(); deepSkyblueRect.graphics.drawRect(0, 0, 100, 100, "#00BFFF"); //设置名称 deepSkyblueRect.name = "天蓝色矩形"; //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) deepSkyblueRect.size(100, 100); deepSkyblueRect.pos(10, 10); L...
来源: Laya2.0_示例 发布时间: 20241123
...t GlowFilter = Laya.GlowFilter; let glowFilter = new GlowFilter("#ffff00", 10, 0, 0); // 设置滤镜集合为发光滤镜 this.ape.filters = [glowFilter]; } } new Filters_Glow();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import GlowFilter = Laya.GlowFilter; import Texture...
来源: Laya2.0_示例 发布时间: 20241123
...Stat.show(); this.setup(); } setup() { const Event = Laya.Event; var gap = 10; //创建一个Sprite充当音效播放按钮 let soundButton = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + gap) / 2; soundButton.y = (Laya.stage.height - soundButton.heig...
来源: Laya2.0_示例 发布时间: 20241123
...2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10; let rowHeightDelta = this.rowSpacing + this.rowHeight; // 显示左侧标签 this.showLabel("邮箱", 0, rowHeightDelta * 0); this.showLabel("出生日期", 0, rowHeightDelta * 1); this.showLabel("密码", 0, rowHeightDel...
来源: Laya2.0_示例 发布时间: 20241123
...路径 let data = []; for (let i = 0; i = []; for (var i: number = 0; i < 10; ++i) { data.push("res/ui/listskins/1.jpg"); data.push("res/ui/listskins/2.jpg"); data.push("res/ui/listskins/3.jpg"); data.push("res/ui/listskins/4.jpg"); data.push("res/ui/listskins/5.jpg"); } list.array = data; } private...
来源: Laya2.0_示例 发布时间: 20241123
...= new Box(); this.refreshLoading.pos(133, 0); this.refreshLoading.bottom = 10; this.refreshLoading.visible = false; this.baseBox.addChild(this.refreshLoading); // 加载动画 this.loadingAni = new Animation(); this.loadingAni.loadAnimation("res/ui/refreshList/ani/Refresh.ani"); this.loadingAni.pos(...
来源: Laya2.0_示例 发布时间: 20241123
...发相应事件\n"; txt.size(Laya.stage.width, Laya.stage.height); txt.pos(10, 50); txt.fontSize = 20; txt.wordWrap = true; txt.color = "#FFFFFF"; Laya.stage.addChild(txt); } } new Interaction_Mouse();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; impo...
来源: Laya2.0_示例 发布时间: 20241123
...nd.addComponent(Laya.ChainCollider); chainCollider.points = "50,200,50,570,1050,570,1050,200"; for (let i = 1; i 0) { legCollider1.points = p1.concat(p2).concat(p3).join(","); legCollider2.points = [0, 0].concat(B2Math.SubVV(p5, p4)).concat(B2Math.SubVV(p6, p4)).join(","); } else { legCollider1.poin...
来源: Laya2.0_示例 发布时间: 20241123
... 20, i); this.createTriangle(500, 300, 20, i); this.createCircle(700, 300, 10, i); } } private function createHouse() { var house= new Sprite(); Laya.stage.addChild(house); var rigidbody: RigidBody = house.addComponent(RigidBody); rigidbody.type = "static"; var chainCollider: ChainCollider = house.a...
来源: Laya2.0_示例 发布时间: 20241123