本文整理汇总了C#中DataContainer.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# DataContainer.GetValue方法的具体用法?C# DataContainer.GetValue怎么用?C# DataContainer.GetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataContainer
的用法示例。
在下文中一共展示了DataContainer.GetValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadData
public override void LoadData(DataContainer container)
{
try
{
waiting = container.GetValue<bool>("waiting");
}
catch(Exception)
{
return;
}
}
示例2: LoadData
public override void LoadData(DataContainer container)
{
if (container != null)
{
if (SaveSystem.Registery.m_firstRegistering)
{
CollectData(container);
SaveSystem.Registery.m_firstRegistering = false;
}
Debug.Log("[SaveSystem] PlayerData --Loading");
//entity restore
m_entity = container.GetValue<EntityBook>("ent");
//weapon restore
playerAmmo.ammoCarriedType0 = container.GetValue<int>("stockAmmo0");
playerAmmo.ammoCarriedType1 = container.GetValue<int>("stockAmmo1");
if (marinesType == MarinesType.MajCarter)
{
weapCCarter.doubleGuns.magazine = container.GetValue<int>("ammo0");
weapCCarter.flamethrower.magazine = container.GetValue<int>("ammo1");
if (weapCCarter.IndexActiveWeapon != container.GetValue<int>("weapIndex"))
weapCCarter.SwitchIndexWeapon();
}
else
{
weapCHartman.assaultRifle.magazineBullet = container.GetValue<int>("ammo0");
weapCHartman.assaultRifle.magazineGrenade = container.GetValue<int>("ammo1");
}
//location restore;
SaveSystem.GetActiveSceneData().StageData.RestorePlayerLocation(transform);
}
}
示例3: LoadData
public override void LoadData(DataContainer container)
{
container.RestoreLocation(transform);
m_entity = container.GetValue<EntityBook>("ent");
}
示例4: LoadData
public override void LoadData(DataContainer container)
{
CanInteract = container.GetValue<bool>("interact");
m_object.SetActive(container.GetValue<bool>("active"));
UpdateWire();
}
示例5: LoadData
public override void LoadData(DataContainer container)
{
amount = container.GetValue<int>("amount");
}