public bool Add(string ident, ref GameView obj) { if (ident == null || obj == null || ident.Length == 0) { return(false); } try { obj.SetIdent(ident); obj.SetHash(Tools.GetHashValueCase(ident)); if (mObjects.ContainsKey(ident)) { return(false); } mObjects.Add(ident, obj); } catch (Exception ex) { LogSystem.Log("Error,GameObjectSet.Add Exception:", ex.ToString()); return(false); } return(true); }
public bool Add(ObjectID ident, ref GameView obj) { if (obj == null || ident.IsNull()) { return(false); } try { obj.SetIdent(ident); obj.SetHash(Tools.GetHashValueCase(ident)); if (mObjects.ContainsKey(ident)) { return(false); } mObjects.Add(ident, obj); } catch (Exception ex) { //Log.Trace("Error,GameObjectSet.Add Exception:" + ex.ToString()); return(false); } return(true); }