本文整理匯總了TypeScript中ikagaka.shell.js.SurfaceUtil類的典型用法代碼示例。如果您正苦於以下問題:TypeScript shell.js.SurfaceUtil類的具體用法?TypeScript shell.js.SurfaceUtil怎麽用?TypeScript shell.js.SurfaceUtil使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了shell.js.SurfaceUtil類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: switch
hits.forEach((filepath)=>{
let buffer = directory[filepath];
let _descript = SurfaceUtil.parseDescript(SurfaceUtil.convert(buffer));
let [__, type, n] = /balloon([sk])(\d+)s\.txt$/.exec(filepath);
$.extend(true, _descript, descript);
switch (type){
case "s": balloons.sakura[Number(n)].descript = _descript; break;
case "k": balloons.kero[Number(n)].descript = _descript; break;
}
});
示例2: loadDescript
private loadDescript(){
let dir = this.directory;
let getName = (dic, reg)=> Object.keys(dic).filter((name)=> reg.test(name))[0] || "";
let descript_name = getName(dir, /^descript\.txt$/i);
if(descript_name === ""){
console.info("descript.txt is not found");
this.descript = {};
}else{
this.descript = SurfaceUtil.parseDescript(SurfaceUtil.convert(dir[descript_name]));
}
return Promise.resolve(this);
}