void OnDestroy() { DCLog.Log("end main"); mChannel.DisposeRes(); mChannel.Close(); mServer.DisposeRes(); mServer.Close(); }
public static void RemoveNormal(DCBaseTimer timer) { if (null == Instance) { return; } DCLog.Log("add to remove"); Instance.mToDelTimerSet.Add(timer); }
void Start() { var asset1 = Resources.Load <TextAsset>("test"); //not null var asset2 = Resources.Load <TextAsset>("test.txt"); //null DCLog.Log("end"); // Resources.Load<Texture2D>(""); }
public static void Test() { var asset1 = AssetDatabase.LoadAssetAtPath <TextAsset>("Assets/DCMMO/Resources/test"); //null var asset2 = AssetDatabase.LoadAssetAtPath <TextAsset>("Assets/DCMMO/Resources/test.txt"); //not null //asset bundle need extension DCLog.Log("end"); }
public void ReleaseId(int id) { var index = id - base_index; if (index < 0 || index >= mIdPool.Length) { DCLog.Log("out range id: " + id); return; } mIdPool[index] = 0; }
void OnAddRoleRes(int id, ProtoPacket proto) { //yeah , let's go to the game world DCLog.Log("yeah , let's go to the game world!"); Close(); MsgSys.Send(PlayerEvt.close_select_role_ui); var sceneId = ParamsCfgMgr.Instance.GetInt((int)PParamsConfig.BeginnerScene); LoadScene(sceneId); }
public void Destroy() { DCLog.Log("Destroy 1"); if (mDestroyed) { return; } mDestroyed = true; DCLog.Log("Destroy 2"); if (mPhysic) { DCTimer.RemovePhysic(this); } else { DCTimer.RemoveNormal(this); } }
public Dictionary <string, string> BuildAssetExtensionMap(string root) { var allFile = Directory.GetFiles(root, "*.*", SearchOption.AllDirectories).Where((item) => !item.EndsWith("meta")).ToList(); DCLog.Log(allFile.Count.ToString()); var dic = new Dictionary <string, string>(); foreach (var aFile in allFile) { var unixFilePath = aFile.Replace('\\', '/'); var assetPath = unixFilePath.Replace(Application.dataPath, "Assets"); var point = assetPath.LastIndexOf('.'); var pathWithOutExt = assetPath.Substring(0, point); var ext = assetPath.Substring(point); dic.Add(pathWithOutExt, ext); } return(dic); }
void OnLoginComplete(int code, string result) { if (code == 1) { var jsonNode = JSON.Parse(result); int svrCode = jsonNode["result"]; if (svrCode == 1) { var token = jsonNode["token"]; DCLog.Log(token); PlayerDataMgr.Instance.UserToken = token; //to login game svr var svrCfg = GameServerDataMgr.Instance.GetLastLoginSvr(); RequestRoleData(svrCfg); } } else if (code == 2) { DCLog.LogEx("net or http error ", result); } }
void OnLoginSvrComplete(int id, ProtoPacket proto) { DCLog.Log("to game world"); Close(); }