本文整理汇总了C++中TSerialize::IsReading方法的典型用法代码示例。如果您正苦于以下问题:C++ TSerialize::IsReading方法的具体用法?C++ TSerialize::IsReading怎么用?C++ TSerialize::IsReading使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSerialize
的用法示例。
在下文中一共展示了TSerialize::IsReading方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SerializeSpawnInfo
//------------------------------------------------------------------------
void CProjectile::SerializeSpawnInfo( TSerialize ser )
{
ser.Value("hostId", m_hostId, 'eid');
ser.Value("ownerId", m_ownerId, 'eid');
ser.Value("weaponId", m_weaponId, 'eid');
ser.Value("pos", m_initial_pos, 'wrld');
ser.Value("dir", m_initial_dir, 'dir0');
ser.Value("vel", m_initial_vel, 'vel0');
if (ser.IsReading())
SetParams(m_ownerId, m_hostId, m_weaponId, m_damage, m_hitTypeId, m_damageDropPerMeter, m_damageDropMinDisSqr);
}
示例2: Serialize
VIRTUAL void Serialize(SActivationInfo* pActInfo, TSerialize ser)
{
float fValue = m_fValue;
ser.BeginGroup("FlowAudioRtpcNode");
ser.Value("value", fValue);
ser.EndGroup();
if (ser.IsReading())
{
SetValue(pActInfo->pEntity, fValue, true);
}
}
示例3: Serialize
virtual void Serialize(SActivationInfo* pActInfo, TSerialize ser)
{
uint32 nCurrentState = m_nCurrentState;
ser.BeginGroup("FlowAudioSwitchNode");
ser.Value("current_state", nCurrentState);
ser.EndGroup();
if (ser.IsReading())
{
m_nCurrentState = 0;
Init(pActInfo, nCurrentState);
}
}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:13,代码来源:FlowAudioSwitchNode.cpp
示例4: Serialize
//------------------------------------------------------------------------
void CVehicleDamageBehaviorBlowTire::Serialize(TSerialize ser, EEntityAspects aspects)
{
if (ser.GetSerializationTarget() != eST_Network)
{
bool bActive = m_isActive;
ser.Value("isActive", bActive);
ser.Value("component", m_component);
if (ser.IsReading())
Activate(bActive);
}
}
示例5: Serialize
void CMasterFader::Serialize( TSerialize ser )
{
if (ser.IsReading())
{
for (int i=0; i<NUM_FADERS; ++i)
{
if (m_pHUDFader[i])
{
m_pHUDFader[i]->Reset();
}
}
}
}
示例6: GetOwnerId
void CC4Projectile::SerializeSpawnInfo( TSerialize ser )
{
BaseClass::SerializeSpawnInfo(ser);
int prevTeamId = m_teamId;
ser.Value("teamId", m_teamId, 'team');
if(ser.IsReading() && prevTeamId != m_teamId)
{
const EntityId clientId = g_pGame->GetIGameFramework()->GetClientActorId();
int localPlayerTeam = g_pGame->GetGameRules()->GetTeam( clientId );
m_OnSameTeam = m_teamId ? m_teamId == localPlayerTeam : GetOwnerId() == clientId;
}
}
示例7: Serialize
virtual void Serialize(SActivationInfo* pActInfo, TSerialize ser)
{
ser.Value("enabled", m_enabled);
// register listeners if this node was saved as enabled
if(ser.IsReading() && m_enabled)
{
if (gEnv->pHardwareMouse)
gEnv->pHardwareMouse->AddListener(this);
if (GetISystem() && GetISystem()->GetIInput())
GetISystem()->GetIInput()->AddEventListener(this);
}
}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:14,代码来源:FlowMouseInfo.cpp
示例8: Serialize
//-----------------------------------------------
void CSingleTG::Serialize(TSerialize ser)
{
//workaround serialization requested by design & RnD
m_idSerializeTarget = m_lockedTarget;
m_fSerializeProgress = m_fStareTime;
ser.Value("m_idSerializeTarget", m_idSerializeTarget);
ser.Value("m_fSerializeProgress", m_fSerializeProgress);
if(ser.IsReading())
{
m_iSerializeIgnoreUpdate = 3;
UpdateTargets();
}
}
示例9: Serialize
//------------------------------------------------------------------------
void CVehicleDamagesGroup::Serialize(TSerialize ser, EEntityAspects aspects)
{
ser.BeginGroup("SubGroups");
for (TDamagesSubGroupVector::iterator ite = m_damageSubGroups.begin();
ite != m_damageSubGroups.end(); ++ite)
{
ser.BeginGroup("SubGroup");
SDamagesSubGroup& subGroup = *ite;
TVehicleDamageBehaviorVector& damageBehaviors = subGroup.m_damageBehaviors;
for (TVehicleDamageBehaviorVector::iterator behaviorIte = damageBehaviors.begin(); behaviorIte != damageBehaviors.end(); ++behaviorIte)
{
IVehicleDamageBehavior* pBehavior = *behaviorIte;
ser.BeginGroup("Behavior");
pBehavior->Serialize(ser, aspects);
ser.EndGroup();
}
ser.EndGroup();
}
ser.EndGroup();
int size = m_delayedSubGroups.size();
ser.Value("DelayedSubGroupEntries", size);
if(ser.IsWriting())
{
for (TDelayedDamagesSubGroupList::iterator ite = m_delayedSubGroups.begin(); ite != m_delayedSubGroups.end(); ++ite)
{
ser.BeginGroup("SubGroup");
SDelayedDamagesSubGroupInfo& delayedInfo = *ite;
ser.Value("delayedInfoId", delayedInfo.subGroupId);
ser.Value("delayedInfoDelay", delayedInfo.delay);
delayedInfo.behaviorParams.Serialize(ser, m_pVehicle);
ser.EndGroup();
}
}
else if(ser.IsReading())
{
m_delayedSubGroups.clear();
for(int i = 0; i < size; ++i)
{
ser.BeginGroup("SubGroup");
SDelayedDamagesSubGroupInfo delayInfo;
ser.Value("delayedInfoId", delayInfo.subGroupId);
ser.Value("delayedInfoDelay", delayInfo.delay);
delayInfo.behaviorParams.Serialize(ser, m_pVehicle);
ser.EndGroup();
}
}
}
示例10: SerializeSpawnInfo
//------------------------------------------------------------------------
void CProjectile::SerializeSpawnInfo( TSerialize ser )
{
ser.Value("hostId", m_hostId, 'eid');
ser.Value("ownerId", m_ownerId, 'eid');
ser.Value("weaponId", m_weaponId, 'eid');
ser.Value("fmId", m_fmId, 'fmod');
ser.Value("pos", m_initial_pos, 'wrld');
ser.Value("dir", m_initial_dir, 'dir0');
ser.Value("vel", m_initial_vel, 'vel0');
ser.Value("tracked", m_tracked, 'bool');
if (ser.IsReading())
SetParams(m_ownerId, m_hostId, m_weaponId, m_fmId, m_damage, m_hitTypeId);
}
示例11: Serialize
//------------------------------------------------------------------------
void CVehiclePartTread::Serialize(TSerialize ser, EEntityAspects aspects)
{
float damageRatio = m_damageRatio;
CVehiclePartBase::Serialize(ser, aspects);
if(ser.GetSerializationTarget() != eST_Network)
{
if (ser.IsReading())
{
if (damageRatio != m_damageRatio)
SetDamageRatio(m_damageRatio);
}
}
}
示例12: Serialize
void CTriggerProxy::Serialize( TSerialize ser )
{
if (ser.GetSerializationTarget() != eST_Network)
{
if (ser.BeginOptionalGroup("TriggerProxy",true))
{
ser.Value("BoxMin",m_aabb.min);
ser.Value("BoxMax",m_aabb.max);
ser.EndGroup();
}
if (ser.IsReading())
OnMove();
}
}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:15,代码来源:TriggerProxy.cpp
示例13: Serialize
void HazardDataSphere::Serialize(TSerialize ser)
{
HazardData::Serialize(ser);
ser.BeginGroup("HazardDataSphere");
m_Context.Serialize(ser);
if (ser.IsReading())
{
m_RadiusSq = m_Context.m_Radius * m_Context.m_Radius;
}
ser.EndGroup();
}
示例14: Serialize
//------------------------------------------------------------------------
void CVehicleSeatActionSound::Serialize(TSerialize ser, EEntityAspects aspects)
{
if (aspects&CVehicle::ASPECT_SEAT_ACTION)
{
NET_PROFILE_SCOPE("SeatAction_Sound", ser.IsReading());
bool enabled=m_enabled;
ser.Value("enabled", enabled, 'bool');
if(ser.IsReading())
{
if(m_enabled != enabled)
{
if (enabled)
ExecuteTrigger(m_nAudioControlIDStart);
else
StopTrigger();
m_enabled=enabled;
}
}
}
}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:25,代码来源:VehicleSeatActionSound.cpp
示例15: Serialize
void SearchSpot::Serialize(TSerialize ser)
{
// VisionID is not serialized. It will be created in InitSearchSpots.
ser.Value("pos", m_pos);
ser.Value("assigneeID", m_assigneeID);
ser.Value("searchTimeoutLeft", m_searchTimeoutLeft);
ser.Value("isTargetSearchSpot", m_isTargetSearchSpot);
uint8 intStatus = (uint8)m_status;
ser.Value("status", intStatus);
if (ser.IsReading())
m_status = (SearchSpotStatus)intStatus;
}