38 lines
		
	
	
		
			826 B
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			826 B
		
	
	
	
		
			C#
		
	
	
	
| using System;
 | |
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| using UnityEngine;
 | |
| 
 | |
| namespace MMO
 | |
| {
 | |
|     [Serializable]
 | |
|     public abstract class MMORequestBase
 | |
|     {
 | |
|         public string RequestURL => string.Format("{0}{1}", MMOConstConfig.Instance.ServerUrl, APIName);
 | |
| 
 | |
|         protected abstract string APIName
 | |
|         {
 | |
|             get;
 | |
|         }
 | |
| 
 | |
|         [SerializeField] private string uid;
 | |
|         [SerializeField] private string gameID;
 | |
| 
 | |
|         public MMORequestBase()
 | |
|         {
 | |
|             uid = string.Format("{0}_{1}", UUIDTool.DeviceID, Application.identifier);
 | |
|             gameID = Application.identifier;
 | |
|         }
 | |
| 
 | |
|         public string RequestJson()
 | |
|         {
 | |
|             return JsonUtility.ToJson(this);
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     [Serializable]
 | |
|     public abstract class MMORespondBase
 | |
|     {
 | |
| 
 | |
|     }
 | |
| } |