本文整理汇总了C#中GameData.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# GameData.GetType方法的具体用法?C# GameData.GetType怎么用?C# GameData.GetType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameData
的用法示例。
在下文中一共展示了GameData.GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: damageStringForCharacter
private string damageStringForCharacter(int characterIndex, GameData.Ability ability, TextBox damageField, ToolTip tooltip)
{
GameData.DataBuddyInformation character = characters[characterIndex];
DataEquipmentInformation weapon = weapons[characterIndex];
DataEquipmentInformation armor = armors[characterIndex];
DataEquipmentInformation accessory = accessories[characterIndex];
DataRecordMateriaInformation recordMateria = recordMaterias[characterIndex];
int damage = (int)Math.Floor(damagePerHit(character, weapon, armor, accessory, recordMateria,
Double.Parse(atkFields[characterIndex].Text), Double.Parse(magFields[characterIndex].Text),
Double.Parse(mndFields[characterIndex].Text), ability));
string damageString = damage.ToString("#,##0.##");
if (ability.NumberOfHits > 1 || ability.GetType() == typeof(GameData.Abilities.ThiefsRevenge))
{
int hits = ability.NumberOfHits;
if (ability.GetType() == typeof(GameData.Abilities.ThiefsRevenge))
{
hits = Math.Max(1, (int)Math.Floor((Double.Parse(spdFields[characterIndex].Text) - 120) / 10));
}
else if (ability.GetType() == typeof(GameData.SoulBreaks.AeonsOfWingAndFlame))
{
double mag = Double.Parse(magFields[characterIndex].Text);
if (mag >= 723)
{
hits = 9;
}
else if (mag >= 681)
{
hits = 8;
}
else if (mag >= 562)
{
hits = 7;
}
}
tooltip.SetToolTip(damageField, (Math.Min(damage, 9999) * hits).ToString("#,##0.##") + " total damage");
damageString += " * " + hits;
}
else
{
tooltip.SetToolTip(damageField, "");
}
return damageString;
}