大约有 267 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0041 秒)
Laya_社区(203) Laya2.0_示例(20) Laya_示例(19) Laya2.0_文档(13) Laya3.0_api(5) Laya3.0_文档(3) laya_api(2) Laya2.0_api(2)
...init = function(){ //黑色背景 this.bg = new Sprite(); this.bg.graphics.drawRect(0,0,Config.GameWidth,Config.GameHeight,"#000000"); this.addChild(this.bg); //loading文本 this.txt = new Text(); this.txt.color = "#ffffff"; this.txt.fontSize = 30; this.txt.text = "Loading"; this.txt.width = Config...
来源: Laya_社区 发布时间: 20160803
...= 40; var button:Sprite = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2 , 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; } private function parseComplete(fac:Templet):void { //创建模式...
来源: Laya_社区 发布时间: 20170406
...0; var button: Sprite = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; } //private musicString:string = "./sounds/心跳的证明.mp3"; pr...
来源: Laya_社区 发布时间: 20190421
... var maskArea:Sprite = new Sprite(); maskArea.alpha = 0; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); maskArea.setName("maskArea") mask.addChild(maskArea); //绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 highLightArea = new ...
来源: Laya_社区 发布时间: 20221010
...tePanel():void { let panel:Laya.Sprite = new Laya.Sprite(); panel.graphics.drawRect(0,100,100,20,0xffffff); this.addChild(panel); let box:laya.physics.BoxCollider = panel.addComponent(laya.physics.BoxCollider); box.height = 20; box.width = 100; let rigid:Laya.RigidBody = panel.addComponent(Laya.Rigi...
来源: Laya_社区 发布时间: 20190428
... function tankSprite() { this.speed_x = 3; this.speed_y = 4; this.graphics.drawRect(0, 0, 90, 90, '#aabbcc', '#bbccdd', 1); Laya.stage.addChild(this); var lastTimestamp = 0; var count = 0; var totale = 0; Laya.timer.frameLoop(1, this, function test() { var deltaTime = new Date().getTime() - lastTime...
来源: Laya_社区 发布时间: 20170920
... } maskSp.graphics.drawRect(0, 0, w, height, '#ffffff'); } } } public function setPercentage(p:Number):void { this.per...
来源: Laya_社区 发布时间: 20180404
...rue; this.addChild(_divElement); var ms:Sprite = new Sprite(); ms.graphics.drawRect(0,0,567,32,"#ffffff"); this.mask = ms; 2017-12-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 ainideqingliang 赞同来自:...
来源: Laya_社区 发布时间: 20171205
...t; this.MapColNum; j++){ var box = new laya.display.Sprite(); box.graphics.drawRect(0, 0, 30, 30, null, "#e6e4ef", 1); box.x = i * 30; box.y = j * 30; boxSp.addChild(box); } } boxSp.cacheAs = "bitmap"; this.addChild(boxSp); } boxSp.cacheAs = "bitmap"; 如果去掉这句话可以显示 是内部设...
来源: Laya_社区 发布时间: 20161008
...MIDDLE; var sp; for(var i=0;i<5;i++){ sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,50,50,"red"); sp.y = i*60; sp.index=i; sp.size(50,50); sp.on(Laya.Event.CLICK,this, function (e) { alert(e.target.index); },[{target:sp}]) Laya.stage.addChild(sp); } 2017-02-21 1 0 分享 微博 QZONE 微信 a...
来源: Laya_社区 发布时间: 20170221