public void GetObjectList(ref VarList result) { if (result == null) { return; } foreach (KeyValuePair <ObjectID, GameObj> kvp in mObjects) { GameObj obj = kvp.Value; if (obj != null && (!obj.GetIdent().IsNull())) { result.AddObject(obj.GetIdent()); } } }
private bool InnerRecvProperty(GameObj obj, LoadArchive loadAr, int count, bool change) { if (obj == null) { return(false); } try { Var key = Var.zero; for (int i = 0; i < count; i++) { int index = 0; if (!loadAr.ReadInt16(ref index)) { return(false); } if (index >= mPropertyTable.Count) { return(false); } PropData propData = GetPropDataByIndex(index); propData.nCount = propData.nCount + 1; if (!InnerParsePropValue(loadAr, propData.nType, ref key)) { return(false); } if (!obj.UpdateProperty(ref propData.strName, key)) { return(false); } if (change) { VarList argList = VarList.GetVarList(); argList.AddString(obj.GetIdent()); argList.AddString(propData.strName); Excute_CallBack("on_object_property_change", argList); argList.Collect(); } } } catch (System.Exception ex) { LogSystem.Log("GameReceiver.InnerRecvViewProperty() Exception:", ex.ToString()); } return(true); }
private bool InnerRecvProperty(GameObj obj, LoadArchive loadAr, int count, bool change) { VarList.VarData key = new VarList.VarData(); for (int i = 0; i < count; i++) { int index = 0; if (!loadAr.ReadInt16(ref index)) { return(false); } if (index >= mPropertyTable.Count) { return(false); } PropData propData = GetPropDataByIndex(index); if (propData == null) { return(false); } propData.nCount = propData.nCount + 1; if (!InnerParsePropValue(loadAr, propData.nType, ref key)) { return(false); } if (!obj.UpdateProperty(ref propData.strName, key)) { return(false); } if (change) { VarList argList = new VarList(); argList.AddObject(obj.GetIdent()); argList.AddString(propData.strName); Excute_CallBack("on_object_property_change", argList); } } return(true); }