大约有 375 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0048 秒)
...ks[event] || []).push(fn); } public request(route, msg, cb) { if(arguments.length === 2 && typeof msg === 'function') { cb = msg; msg = {}; } else { msg = msg || {}; } route = route || msg.route; if(!route) { return; } this.reqId++; if(this.reqId>127){ this.reqId = 1; } var reqId = this.r...
来源: Laya_社区 发布时间: 20180119
...rite",this._childs[k]); } this.removeChildren(); var charTotal: number = v.length; var charSps: any = ; for(var i=0;i<charTotal;i++){ var targetChar = v.substr(i,1); var charData: any = this._jsonData.frames[targetChar]; if(!charData){ console.warn("没有找到对应的字符:" + targetChar); ...
来源: Laya_社区 发布时间: 20161014
...private createChars(v: string): void { if (!v) { return; } let charNum = v.length; for (let i = 0; i < charNum; i++) { let char = v.charAt(i); let resName = this.getResName(char); let sp: Laya.Sprite = this.getSprite(); let tx = Laya.Loader.getRes(resName); if (!tx) { console.warn(TipConfig.tips....
来源: Laya_社区 发布时间: 20180302
...yBuffer的Bug __proto.writeArrayBuffer=function(arraybuffer,offset,length){ (offset===void 0)&& (offset=0); (length===void 0)&& (length=0); if (offset < 0 || length < 0)throw "writeArrayBuffer error - Out of bounds"; ...
来源: Laya_社区 发布时间: 20180328
...tr){ this._sourceStr=str; var texLen = str.length; var idx = -1; this._words = ; while (++idx < texLen) { var character = str.charAt(idx); var code = str.charCodeAt(idx)...
来源: Laya_社区 发布时间: 20180517
...map((x: number) => target[index + x]) : [] ) .filter((x: any[]) => x.length > 0); if (markString) result = result.map((x: any[]) => x.join("")) return result; } padding(str: string | any[], length: number, char: string, tail: boolean = true, isArray: boolean = Array.isArray(str)) { let a...
来源: Laya_社区 发布时间: 20190321
...Sprite; for (var i = 0; i < this.aniSpriteArray.length; i++) { tAniSprite = this.aniSpriteArray[i]; tAniSprite.show(); } } } hide () { ...
来源: Laya_社区 发布时间: 20220627
...ction initSnake() { for (var i = 0; i 0) { var prevSeg = segments[segments.length - 1]; seg.rotation = prevSeg.rotation; var point = seg.getPinPosition(); seg.x = prevSeg.x - point.x; seg.y = prevSeg.y - point.y; } segments.push(seg); } function animate() { var seg = segments[0]; // 更新蛇的位...
来源: Laya_示例 发布时间: 20241125
...Point = Laya.Point; for (let i = 0; i 0) { let prevSeg = segments[segments.length - 1]; seg.rotation = prevSeg.rotation; let point = seg.getPinPosition(); seg.x = prevSeg.x - point.x; seg.y = prevSeg.y - point.y; } segments.push(seg); } animate() { let seg = segments[0]; // 更新蛇的位置 target...
来源: Laya2.0_示例 发布时间: 20241125
...ine { private points: number[]; constructor(points: number[]) { if (points.length < 4 || points.length % 2 !== 0) { throw new Error("At least two points (four numbers) are required, and the total number of values must be even"); } this.points = points; } private static distance(x1: number, y1: nu...
来源: Laya_社区 发布时间: 20241008