示例#1
0
 /// <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;
 }