Exemplo n.º 1
0
        public static void BlackHoleAim()
        {
            if (blackholeAim == null || !blackholeAim.IsValid)
            {
                blackholeAim = new SpellAimSphere(new Color(0f, .6f, 0.95f, 0.5f), ModdedPlayer.Stats.spell_blackhole_radius);
            }
            Transform t = Camera.main.transform;

            Vector3 point = Vector3.zero;
            var     hits1 = Physics.RaycastAll(t.position, t.forward, 35f);

            foreach (var hit in hits1)
            {
                if (hit.transform.root != LocalPlayer.Transform.root)
                {
                    point = hit.point + Vector3.up * 2f;
                    break;
                }
            }
            if (point == Vector3.zero)
            {
                point = LocalPlayer.Transform.position + t.forward * 30;
            }
            blackholeAim.SetRadius(ModdedPlayer.Stats.spell_blackhole_radius);
            blackholeAim.UpdatePosition(point);
        }
Exemplo n.º 2
0
        public static void MagicArrowAim()
        {
            if (arrowAim == null || !arrowAim.IsValid)
            {
                arrowAim = new SpellAimSphere(new Color(0f, 1f, 0.55f, 0.5f), 1f);
            }
            Transform t = Camera.main.transform;

            if (Physics.Raycast(t.position + t.forward, t.forward, out RaycastHit hit, 250))
            {
                arrowAim.UpdatePosition(hit.point);
            }