update framework
parent
2096336317
commit
93e0b340d8
|
@ -1,10 +1,3 @@
|
||||||
// Learn TypeScript:
|
|
||||||
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
|
|
||||||
// Learn Attribute:
|
|
||||||
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
|
|
||||||
// Learn life-cycle callbacks:
|
|
||||||
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
|
|
||||||
|
|
||||||
const {ccclass, property} = cc._decorator;
|
const {ccclass, property} = cc._decorator;
|
||||||
|
|
||||||
@ccclass
|
@ccclass
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace Configs {
|
||||||
static Coin: number = 0;
|
static Coin: number = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SERVER_IP = 'ws://13.251.151.251:3035';
|
export const SERVER_IP = 'ws://127.0.0.1:3035';
|
||||||
|
|
||||||
export const SOCKET_EVENT = {
|
export const SOCKET_EVENT = {
|
||||||
//sys event---------
|
//sys event---------
|
||||||
|
|
|
@ -266,6 +266,42 @@ export default class GameUtil {
|
||||||
return ip;
|
return ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CSVToArray( strData, strDelimiter ) {
|
||||||
|
strDelimiter = (strDelimiter || ",");
|
||||||
|
var objPattern = new RegExp(
|
||||||
|
(
|
||||||
|
"(\\" + strDelimiter + "|\\r?\\n|\\r|^)" +
|
||||||
|
"(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|" +
|
||||||
|
"([^\"\\" + strDelimiter + "\\r\\n]*))"
|
||||||
|
),
|
||||||
|
"gi"
|
||||||
|
);
|
||||||
|
var arrData = [[]];
|
||||||
|
var arrMatches = null;
|
||||||
|
while (arrMatches = objPattern.exec( strData )){
|
||||||
|
var strMatchedDelimiter = arrMatches[ 1 ];
|
||||||
|
if (
|
||||||
|
strMatchedDelimiter.length &&
|
||||||
|
(strMatchedDelimiter != strDelimiter)
|
||||||
|
){
|
||||||
|
arrData.push( [] );
|
||||||
|
}
|
||||||
|
if (arrMatches[ 2 ]){
|
||||||
|
var strMatchedValue = arrMatches[ 2 ].replace(
|
||||||
|
new RegExp( "\"\"", "g" ),
|
||||||
|
"\""
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
var strMatchedValue = arrMatches[ 3 ];
|
||||||
|
}
|
||||||
|
arrData[ arrData.length - 1 ].push( strMatchedValue );
|
||||||
|
}
|
||||||
|
if(arrData.length>0){
|
||||||
|
arrData.pop();
|
||||||
|
}
|
||||||
|
return arrData;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
class DateUtil extends Date {
|
class DateUtil extends Date {
|
||||||
customFormat = function (formatString) {
|
customFormat = function (formatString) {
|
||||||
|
|
Loading…
Reference in New Issue