public DBase(string idOrRid, Hashtable db = null, Hashtable dbTmp = null) { if (IdUtil.IsRid(idOrRid)) { string rid = idOrRid; this.rid = rid; this.id = IdUtil.RidToId(rid); } else { this.id = idOrRid; this.rid = IdUtil.NewRid(this.id); } this.db = db ?? new Hashtable(); this.dbTmp = dbTmp ?? new Hashtable(); }
public Scene GetChildScene(string idOrRid, string belong = null) { if (IdUtil.IsRid(idOrRid)) // rid的情况 { string rid = idOrRid; if (!this.oChildScenes.GetSceneDict_ToEdit().ContainsKey(rid)) { return(null); } Scene childScene = this.oChildScenes.GetSceneDict_ToEdit()[rid] as Scene; if (belong != null && !childScene.GetBelong().Equals(belong)) { return(null); } return(childScene); } else // id的情况 { string id = idOrRid; Scene[] childScenes = GetChildScenes(id, belong); return(childScenes.Length == 0 ? null : childScenes[0]); } }