大约有 20 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0179 秒)
...个素材是 32 * 20 拼起来的 this.y = 32 * 6 + 32 * parseInt(8 * Math.random()); if(this.bg == null){ //贴图纹理 this.bgTexture = Laya.loader.getRes("res/floor.png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); //将当前的坐标向上移动32 方便后面处理人物...
来源: Laya_社区 发布时间: 20160728
...r() { sp.graphics.clear(); var rc:number = Math.floor(Math.random()*0xffffff); sp.graphics.drawRect(-50,-100,100,100,"#"+rc); } 这样多包几层,点击区域就会怪怪的,绘制的区域和点击区域不一样,不知道是不是我理解的有问题 2018-01-06 添...
来源: Laya_社区 发布时间: 20180106
...= [1,2,3,4,5,6,7]; if(第一关过关了){ var 随机数 = Math.floor(Math.random() * 未过的关数.length; var 新的未过的关数 = []; var 剩下关数 = 未过的关数.length - 1; for(var i =0;i<剩下关数;i++){ if(i != 随机数){ 新的未过的关数.push(未过的关数[i]); } } ...
来源: Laya_社区 发布时间: 20180615
...).slice(-strLen); } private evalBgColor(): void { var color: number = Math.random() * 0xFFFFFF; var channels: Array = this.getColorChannals(color); this.bgColorTweener.to(this.bgColorChannels, { r: channels[0], g: channels[1], b: channels[2] }, this.gradientInterval, null, Handler.create(this, this....
来源: Laya_示例 发布时间: 20251130
...).slice(-strLen); } private evalBgColor(): void { var color: number = Math.random() * 0xFFFFFF; var channels: Array = this.getColorChannals(color); this.bgColorTweener.to(this.bgColorChannels, { r: channels[0], g: channels[1], b: channels[2] }, this.gradientInterval, null, Handler.create(this, this....
来源: Laya2.0_示例 发布时间: 20251130
...个素材是 32 * 20 拼起来的 this.y = 32 * 6 + 32 * parseInt(8 * Math.random()); if(this.bg == null){ //贴图纹理 this.bgTexture = Laya.loader.getRes("res/floor.png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); this.addChild(this.bg); //因为上面的图片是截取的 ...
来源: Laya_社区 发布时间: 20160803
...ype === "enemy3"){ // 随机是子弹道具还是医疗包 var type = Math.random() < 0.7 ? 2 : 3; var item = Laya.Pool.getItemByClass("role",Role); // 初始化信息 item.init("ufo" + (type - 1),role.camp,1,1,15,type); // 设置位置 item.pos(role.x,role.y); // 添加到舞台上 Laya.stage.ad...
来源: Laya_社区 发布时间: 20170525
...ype === "enemy3"){ // 随机是子弹道具还是医疗包 var type = Math.random() < 0.7 ? 2 : 3; var item = Laya.Pool.getItemByClass("role",Role); // 初始化信息 item.init("ufo" + (type - 1),role.camp,1,1,15,type); // 设置位置 item.pos(role.x,role.y); // 添加到舞台上 Laya.stage.ad...
来源: Laya_社区 发布时间: 20170525
...en, str.length - len - 1); console.log(name); let number = Math.floor(Math.random() * 9999); let name2; let lastIndex = name.lastIndexOf("_"); if(lastIndex == -1){ name2 = name + "_" + number; }else{ name2 = name.substr(0, lastIndex) + "_" + number; } let name2s = name2 + "("; //phpContent = phpCont...
来源: Laya_社区 发布时间: 20190613
...个素材是 32 * 20 拼起来的 this.y = 32 * 6 + 32 * parseInt(8 * Math.random()); if(this.bg == null){ //贴图纹理 this.bgTexture = Laya.loader.getRes("res/floor.png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); this.addChild(this.bg); //因为上面的图片是截取的 ...
来源: Laya_社区 发布时间: 20160801