本文整理汇总了C#中Serializer.GetDataElement方法的典型用法代码示例。如果您正苦于以下问题:C# Serializer.GetDataElement方法的具体用法?C# Serializer.GetDataElement怎么用?C# Serializer.GetDataElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Serializer
的用法示例。
在下文中一共展示了Serializer.GetDataElement方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
protected override void Deserialize(Serializer serializer)
{
_boneFrameStartValues = GetStateData(serializer.GetDataElement("starting-values"));
_boneFrameEndValues = GetStateData(serializer.GetDataElement("target-values"));
foreach (KeyValuePair<string, SkeletalKeyframe.DataContainer> kvp in _boneFrameEndValues)
{
if (kvp.Value.Rotation < 0.0f) { kvp.Value.Rotation = _boneFrameStartValues[kvp.Key].Rotation; }
if (kvp.Value.Scale < 0.0f) { kvp.Value.Rotation = _boneFrameStartValues[kvp.Key].Scale; }
}
base.Deserialize(serializer);
}
示例2: Deserialize
public void Deserialize(XElement serializedData)
{
Serializer serializer = new Serializer(serializedData);
_settings = serializer.GetDataItem<PhoneSettings>("config-settings");
_hasRated = serializer.GetDataItem<bool>("has-rated");
if (serializedData.Elements("dataitem").Any(x => x.Attribute("name").Value == "reminder-plays"))
{
_playsBeforeNextReminder = serializer.GetDataItem<int>("reminder-plays");
}
else
{
_playsBeforeNextReminder = Initial_Plays_Before_Rating_Reminder;
}
_nextReminderDate = serializer.GetDataItem<DateTime>("next-reminder");
_livesElementAdded = serializer.GetDataItem<bool>("lives-added");
_livesRemaining = serializer.GetDataItem<int>("lives-remaining");
_lastLivesUpdateTime = serializer.GetDataItem<DateTime>("lives-updated");
_goldenTicketCount = serializer.GetDataItem<int>("golden-tickets");
_currentArea = serializer.GetDataItem<string>("last-area");
LoadAreaDataFromXml(serializer.GetDataElement("survival-area-data"));
LoadAvatarComponentDataFromXml(serializer.GetDataElement("avatar-component-data"));
}
示例3: Deserialize
protected virtual void Deserialize(Serializer serializer)
{
_currentKeyframeIndex = serializer.GetDataItem<int>("current-frame-index");
_currentKeyframeMillisecondsElapsed = serializer.GetDataItem<float>("current-frame-elapsed");
_sequence = new AnimationSequence(serializer.GetDataItem<AnimationSequence.AnimationSequenceType>("sequence-type"));
_sequence.Loops = serializer.GetDataItem<bool>("loop-sequence");
XElement frames = serializer.GetDataElement("keyframes");
if (frames != null)
{
foreach (XElement frame in frames.Elements("keyframe")) { _sequence.Keyframes.Add(DeserializeKeyframe(frame)); }
}
}
示例4: Deserialize
protected virtual void Deserialize(Serializer serializer)
{
RaceName = serializer.GetDataItem<string>("race-name");
ControlSensitivity = serializer.GetDataItem<float>("control-sensitivity");
SelectedAvatarSlot = serializer.GetDataItem<int>("selected-avatar");
MusicManager.Muted = serializer.GetDataItem<bool>("music-off");
SoundEffectManager.Muted = serializer.GetDataItem<bool>("sound-off");
ShowPowerUpHelpers = serializer.GetDataItem<bool>("powerup-helpers-on");
DeserializeAvatarCustomisations(serializer.GetDataElement("avatar-customisations"));
}