本文整理汇总了C#中EnemyController.GetSize方法的典型用法代码示例。如果您正苦于以下问题:C# EnemyController.GetSize方法的具体用法?C# EnemyController.GetSize怎么用?C# EnemyController.GetSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EnemyController
的用法示例。
在下文中一共展示了EnemyController.GetSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateCoeficient
/// <summary>
/// Calculates the coeficients for scaling
/// </summary>
/// <param name="player"></param>
/// <param name="enemy"></param>
/// <returns></returns>
public float CalculateCoeficient(PlayerController player, EnemyController enemy)
{
if (player.GetSize() > player.startsize * 2f)
{
return coeficient = 0.012f;
}
if (player.GetSize() > player.startsize * 4f)
{
return coeficient = 0.015f;
}
if (player.GetSize() > player.startsize * 6f)
{
return coeficient = enemy.GetSize() * 0.016f;
}
else
{
if (player.GetSize() < player.startsize * 2)
{
if (player.GetSize() <= player.startsize * 0.5f)
{
return coeficient = enemy.GetSize() * 0.02f;
}
else
{
return coeficient = enemy.GetSize() * 0.025f;
}
}
}
return coeficient;
}
示例2: ScaleObject
/// <summary>
///
/// </summary>
/// <param name="player"></param>
/// <param name="enemy"></param>
/// <returns></returns>
public virtual float ScaleObject(PlayerController player, EnemyController enemy)
{
step = Step();
return size += CalculateCoeficient(player, enemy) * enemy.GetSize();
}