大约有 84 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0064 秒)
...on spHandler() { sp.graphics.clear(); var rc:number = Math.floor(Math.random()*0xffffff); sp.graphics.drawRect(-50,-100,100,100,"#"+rc); } 这样多包几层,点击区域就会怪怪的,绘制的区域和点击区域不一样,不知道是不是我理解的有问题 2018...
来源: Laya_社区 发布时间: 20180106
...value += 0.05; } function onChange(value) { console.log("进度:" + Math.floor(value * 100) + "%"); } })();module laya { import Stage = Laya.Stage; import ProgressBar = Laya.ProgressBar; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_ProgressBar { private progressBar: Pr...
来源: Laya_示例 发布时间: 20260303
...gressBar.value += 0.05; } onChange(value) { console.log("进度:" + Math.floor(value * 100) + "%"); } } new UI_ProgressBar();module laya { import Stage = Laya.Stage; import ProgressBar = Laya.ProgressBar; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_ProgressBar { priva...
来源: Laya2.0_示例 发布时间: 20260303
...的关数 = [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
... (this.loadedClips.length > 0) { const clipPath = this.loadedClips[Math.floor(Math.random() * this.loadedClips.length)]; this.playMcClip(clipPath); } else { // 兜底:用 Animator2D 状态机 const idx = Math.floor(Math.random() * 8) + 1; this._animator?.play(`move${idx}`); } } /* -------------...
来源: Laya_社区 发布时间: 20251211
...啊 public onChange(value: number): void { console.log("进度:" + Math.floor(value * 100) + "%"); var num:number = Math.floor(value*100); // this.updateFont(num); this.updateFont(100); //test用 // if(num==100){ // G.I.loginManager.preload(); // } } private hbox:Laya.HBox; private updateFont(valu...
来源: Laya_社区 发布时间: 20180615
...h.PI * 180; _path2.pos(a.x,a.y); this.addChild(_path2); var len:int = Math.floor(GetPathLen()/PATH_LEN)+2; SetPathArr(arr,_path); SetPathArr(arr2,_path2); //注释下面这行就正常了 _path.scrollRect = new Rectangle(0,0,(len-3)*PATH_LEN-30,58); _path2.scrollRect = new Rectangle(0,0,(len-3)*PATH...
来源: Laya_社区 发布时间: 20171129
...width != 640) { var ratio:Number = width / 640; width = 640; height = Math.floor(height / ratio); } if (height > 1280) height = 1280; else if (height < 960) height = 960;*/ var browerRatio:Number = width / height ; if( height != 1136 ) { // w 640 // h 1136 var ratioW:Number = height / 1136 ; h...
来源: Laya_社区 发布时间: 20170828
...val:int = 1 / animator.cacheFrameRate; //总帧数 var endFrame:int = Math.floor(maxTime / frameInterval); //计算开始帧 var startFrame:int = Math.floor(endFrame * (1 - percent)); animator.addClip(totalAnimationClip,"runShoot",startFrame); animator.on(Event.STOPPED, this, this.removeClip); anima...
来源: Laya_社区 发布时间: 20180725
... 222行 , 二二二。。。。。 _currentKeyframeIndex = Math.max(Math.floor(currentPlayTime / cacheFrameInterval), 0);//TODO:矫正 修正后的正确值: _currentKeyframeIndex = Math.round(currentPlayTime / cacheFrameInterval);//TODO:矫正 不修正的话,此条件一直不会满...
来源: Laya_社区 发布时间: 20190309