Пример #1
0
        float Angle(Vector3 direction, Vector3 differnce)
        {
            float angle = PO.AngleFromVectorsZ(direction, differnce);

            if (angle < 0)
            {
                angle *= -1;
            }

            return(MathHelper.Clamp(angle, 0, MathHelper.Pi));
        }
Пример #2
0
        protected float AimedFire()
        {
            float percentChance = 0.25f - (Main.instance.Score * 0.00001f);

            if (percentChance < 0)
            {
                percentChance = 0;
            }

            return(PO.AngleFromVectorsZ(Main.instance.ThePlayer.Position) +
                   Core.RandomMinMax(-percentChance, percentChance));
        }