private void OnPropertyVector3(UInt16 id, MemoryStream stream) { NFMsg.MsgBase xMsg = new NFMsg.MsgBase(); xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream); NFMsg.ObjectPropertyVector3 propertyData = new NFMsg.ObjectPropertyVector3(); propertyData = Serializer.Deserialize <NFMsg.ObjectPropertyVector3>(new MemoryStream(xMsg.msg_data)); NFIObject go = mKernelModule.GetObject(mHelpModule.PBToNF(propertyData.player_id)); for (int i = 0; i < propertyData.property_list.Count; i++) { NFIPropertyManager propertyManager = go.GetPropertyManager(); NFIProperty property = propertyManager.GetProperty(System.Text.Encoding.Default.GetString(propertyData.property_list[i].property_name)); if (null == property) { NFDataList varList = new NFDataList(); varList.AddVector3(new NFVector3()); property = propertyManager.AddProperty(System.Text.Encoding.Default.GetString(propertyData.property_list[i].property_name), varList); } property.SetVector3(mHelpModule.PBToNF(propertyData.property_list[i].data)); } }
public override bool SetPropertyVector3(string strPropertyName, NFVector3 obj) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { NFDataList.TData xValue = new NFDataList.TData(NFDataList.VARIANT_TYPE.VTYPE_VECTOR3); property = mPropertyManager.AddProperty(strPropertyName, xValue); } property.SetVector3(obj); return(true); }
public override bool SetPropertyVector3(string strPropertyName, NFVector3 obj) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { NFIDataList valueList = new NFCDataList(); valueList.AddVector3(new NFVector3()); property = mPropertyManager.AddProperty(strPropertyName, valueList); } property.SetVector3(obj); return(true); }
private void OnPropertyVector3(UInt16 id, MemoryStream stream) { NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream); NFMsg.ObjectPropertyVector3 propertyData = NFMsg.ObjectPropertyVector3.Parser.ParseFrom(xMsg.msg_data); NFIObject go = mKernelModule.GetObject(mHelpModule.PBToNF(propertyData.player_id)); for (int i = 0; i < propertyData.property_list.Count; i++) { NFIPropertyManager propertyManager = go.GetPropertyManager(); NFIProperty property = propertyManager.GetProperty(propertyData.property_list[i].property_name.ToStringUtf8()); if (null == property) { NFDataList varList = new NFDataList(); varList.AddVector3(new NFVector3()); property = propertyManager.AddProperty(propertyData.property_list[i].property_name.ToStringUtf8(), varList); } property.SetVector3(mHelpModule.PBToNF(propertyData.property_list[i].data)); } }