本文整理汇总了C++中TSerialize::ValueChar方法的典型用法代码示例。如果您正苦于以下问题:C++ TSerialize::ValueChar方法的具体用法?C++ TSerialize::ValueChar怎么用?C++ TSerialize::ValueChar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSerialize
的用法示例。
在下文中一共展示了TSerialize::ValueChar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Serialize
void SGrabStats::Serialize(TSerialize ser)
{
assert(ser.GetSerializationTarget() != eST_Network);
if(ser.BeginOptionalGroup("SGrabStats", true))
{
//when reading, reset the structure first.
if(ser.IsReading())
Reset();
ser.Value("grabId", grabId);
ser.Value("dropId", dropId);
ser.Value("lHoldPos", lHoldPos);
ser.Value("throwVector", throwVector);
ser.Value("additionalRotation", additionalRotation);
ser.Value("limbNum", limbNum);
for(int i=0; i < limbNum; ++i)
{
char limbName[64];
_snprintf(limbName, 64, "limbId%d", i);
ser.Value(limbName, limbId[i]);
}
ser.Value("resetFlagsDelay", resetFlagsDelay);
ser.Value("grabDelay", grabDelay);
ser.Value("throwDelay", throwDelay);
ser.Value("maxDelay", maxDelay);
ser.Value("followSpeed", followSpeed);
ser.Value("useIKRotation", useIKRotation);
ser.Value("collisionFlags", collisionFlags);
ser.Value("usingAnimation", usingAnimation);
ser.Value("usingAnimationForGrab", usingAnimationForGrab);
ser.Value("usingAnimationForDrop", usingAnimationForDrop);
ser.ValueChar("carryAnimGraphInput", (char *)carryAnimGraphInput, s_maxAGInputNameLen);
ser.ValueChar("grabAnimGraphSignal", (char *)grabAnimGraphSignal, s_maxAGInputNameLen);
ser.ValueChar("dropAnimGraphSignal", (char *)dropAnimGraphSignal, s_maxAGInputNameLen);
ser.Value("IKActive", IKActive);
ser.Value("releaseIKTime", releaseIKTime);
ser.Value("followBoneID", followBoneID);
ser.Value("followBoneWPos", followBoneWPos);
ser.Value("grabbedObjOfs", grabbedObjOfs);
ser.Value("readIkInaccuracyCorrection", readIkInaccuracyCorrection);
ser.Value("ikInaccuracyCorrection", ikInaccuracyCorrection);
ser.Value("origRotation", origRotation);
ser.Value("origEndBoneWorldRotTrans", origEndBoneWorldRot.t);
ser.Value("origEndBoneWorldRotQuat", origEndBoneWorldRot.q);
ser.Value("origRotationsValid", origRotationsValid);
ser.Value("entityGrabSpot", entityGrabSpot);
ser.Value("boneGrabOffset", boneGrabOffset);
ser.EndGroup();
}
}
示例2: FullSerialize
void CMonoEntityExtension::FullSerialize(TSerialize ser)
{
IEntity *pEntity = GetEntity();
ser.BeginGroup("Properties");
auto pPropertyHandler = static_cast<CEntityPropertyHandler *>(pEntity->GetClass()->GetPropertyHandler());
for(int i = 0; i < pPropertyHandler->GetPropertyCount(); i++)
{
if(ser.IsWriting())
{
IEntityPropertyHandler::SPropertyInfo propertyInfo;
pPropertyHandler->GetPropertyInfo(i, propertyInfo);
ser.Value(propertyInfo.name, pPropertyHandler->GetProperty(pEntity, i));
}
else
{
IEntityPropertyHandler::SPropertyInfo propertyInfo;
pPropertyHandler->GetPropertyInfo(i, propertyInfo);
char *propertyValue = nullptr;
ser.ValueChar(propertyInfo.name, propertyValue, 0);
pPropertyHandler->SetProperty(pEntity, i, propertyValue);
}
}
ser.EndGroup();
ser.BeginGroup("ManagedEntity");
IMonoArray *pArgs = CreateMonoArray(1);
pArgs->InsertNativePointer(&ser);
m_pScript->GetClass()->InvokeArray(m_pScript->GetManagedObject(), "InternalFullSerialize", pArgs);
pArgs->Release();
ser.EndGroup();
}