Beispiel #1
0
        public float GetDeviatedAngleFromDamageRatio()
        {
            MyEntity topMostParent = GetTopMostParent();

            if (MySession.PlayerShip != null &&
                MyFactions.GetFactionsRelation(topMostParent, MySession.PlayerShip) == MyFactionRelationEnum.Enemy)
            {
                float degrees = (float)Math.Pow(120, topMostParent.GetDamageRatio() * 1.5 - 1.2) * 4f;
                return(MathHelper.ToRadians(degrees));
            }
            return(0f);
        }