38 lines
		
	
	
		
			732 B
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			732 B
		
	
	
	
		
			Plaintext
		
	
	
	
| /*
 | |
|  * @函数作用: 输出函数
 | |
|  * @参数 any
 | |
|  */
 | |
| function print(Object) {
 | |
|     switch (typeof Object) {
 | |
|         case "table":
 | |
|         case "array": {
 | |
|             local str = Json.Encode(Object);
 | |
|             OutPutTable(str);
 | |
|             break;
 | |
|         }
 | |
|         case "string":
 | |
|         case "integer": {
 | |
|             output(Object);
 | |
|             break;
 | |
|         }
 | |
|         default:
 | |
|             output(Object);
 | |
|             break;
 | |
|     }
 | |
| }
 | |
| 
 | |
| /*
 | |
|  * @函数作用: 深拷贝Table
 | |
|  */
 | |
| function sq_DeepCopy(original) {
 | |
|     local Ret = Json.Encode(original);
 | |
|     Ret = Json.Decode(Ret);
 | |
|     return Ret;
 | |
| }
 | |
| 
 | |
| /*
 | |
|  * @函数作用: 返回颜色的十六进制数
 | |
|  */
 | |
| function sq_RGBA(R, G, B, A) {
 | |
|     return (A << 24) + (R << 16) + (G << 8) + B;
 | |
| } |