[add] Lobby 按鈕功能
This commit is contained in:
@@ -20,6 +20,8 @@ declare interface Array<T> {
|
||||
* @param call Callback function.
|
||||
*/
|
||||
AddListener(call: Function): void;
|
||||
/** 深拷貝 */
|
||||
Copy(): any[];
|
||||
}
|
||||
|
||||
Array.prototype.ExRemoveAt || Object.defineProperty(Array.prototype, "ExRemoveAt", {
|
||||
@@ -92,4 +94,11 @@ Array.prototype.AddListener || Object.defineProperty(Array.prototype, "AddListen
|
||||
EventHandler.handler = <any>call;
|
||||
this.push(EventHandler);
|
||||
}
|
||||
});
|
||||
|
||||
Array.prototype.Copy || Object.defineProperty(Array.prototype, "Copy", {
|
||||
enumerable: false,
|
||||
value: function (): any[] {
|
||||
return Array.from(this);
|
||||
}
|
||||
});
|
||||
12
assets/Script/Engine/Utils/Object.meta
Normal file
12
assets/Script/Engine/Utils/Object.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.1.2",
|
||||
"uuid": "a726d04f-4b2c-4e8f-9160-ef0fb6d11625",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
||||
10
assets/Script/Engine/Utils/Object/ObjectEx.ts
Normal file
10
assets/Script/Engine/Utils/Object/ObjectEx.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
export module ObjectEx {
|
||||
|
||||
/**
|
||||
* 深拷貝
|
||||
*/
|
||||
export function Copy(any: any): any {
|
||||
return JSON.parse(JSON.stringify(any));
|
||||
}
|
||||
}
|
||||
9
assets/Script/Engine/Utils/Object/ObjectEx.ts.meta
Normal file
9
assets/Script/Engine/Utils/Object/ObjectEx.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"uuid": "8d75fc79-4886-48fc-8350-e2f3ae19a079",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
||||
Reference in New Issue
Block a user