本文整理汇总了C#中Stats.BeginUnsafe方法的典型用法代码示例。如果您正苦于以下问题:C# Stats.BeginUnsafe方法的具体用法?C# Stats.BeginUnsafe怎么用?C# Stats.BeginUnsafe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stats
的用法示例。
在下文中一共展示了Stats.BeginUnsafe方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AccumulateBuffsStats
public unsafe virtual void AccumulateBuffsStats(Stats stats, List<Buff> buffs)
#endif
{
#if !SILVERLIGHT
fixed (float* pRawAdditiveData = stats._rawAdditiveData, pRawMultiplicativeData = stats._rawMultiplicativeData, pRawNoStackData = stats._rawNoStackData)
{
stats.BeginUnsafe(pRawAdditiveData, pRawMultiplicativeData, pRawNoStackData);
#endif
foreach (Buff buff in buffs)
if (buff != null)
{
stats.AccumulateUnsafe(buff.Stats, true);
}
#if !SILVERLIGHT
stats.EndUnsafe();
}
#endif
}
示例2: AccumulateSetBonusStats
public unsafe virtual void AccumulateSetBonusStats(Stats stats, Dictionary<string, int> setBonusCount)
#endif
{
#if !SILVERLIGHT
fixed (float* pRawAdditiveData = stats._rawAdditiveData, pRawMultiplicativeData = stats._rawMultiplicativeData, pRawNoStackData = stats._rawNoStackData)
{
stats.BeginUnsafe(pRawAdditiveData, pRawMultiplicativeData, pRawNoStackData);
#endif
foreach (KeyValuePair<string, int> pair in setBonusCount)
{
Buff[] setBonuses = Buff.GetSetBonuses(pair.Key);
if (setBonuses != null)
{
foreach (Buff buff in setBonuses)
{
if (buff != null && pair.Value >= buff.SetThreshold)
{
stats.AccumulateUnsafe(buff.Stats, true);
}
}
}
}
#if !SILVERLIGHT
stats.EndUnsafe();
}
#endif
}
示例3: AccumulateItemStats
public unsafe virtual void AccumulateItemStats(Stats stats, Character character, Item additionalItem)
#endif
{
#if !SILVERLIGHT
fixed (float* pRawAdditiveData = stats._rawAdditiveData, pRawMultiplicativeData = stats._rawMultiplicativeData, pRawNoStackData = stats._rawNoStackData)
{
stats.BeginUnsafe(pRawAdditiveData, pRawMultiplicativeData, pRawNoStackData);
#endif
for (int slot = 0; slot < Character.OptimizableSlotCount; slot++)
{
if (slot != (int)CharacterSlot.OffHand || IncludeOffHandInCalculations(character))
{
ItemInstance item = character._item[slot];
if ((object)item != null)
{
item.AccumulateTotalStats(character, stats);
}
}
}
if (additionalItem != null)
stats.AccumulateUnsafe(additionalItem.Stats);
#if !SILVERLIGHT
stats.EndUnsafe();
}
#endif
}