Exemplo n.º 1
0
        private Player target()
        {
            Player player = ArchaeaNPC.FindClosest(npc, true);

            if (player != null && player.active && !player.dead)
            {
                npc.target = player.whoAmI;
                return(player);
            }
            return(Main.player[npc.target]);
        }
Exemplo n.º 2
0
        public Player target()
        {
            Player player = ArchaeaNPC.FindClosest(npc, findClosest);

            if (player != null && npc.Distance(player.position) < range)
            {
                npc.target = player.whoAmI;
                return(player);
            }
            else
            {
                return(Main.player[npc.target]);
            }
        }
Exemplo n.º 3
0
        public Player target()
        {
            Player player = ArchaeaNPC.FindClosest(npc, firstTarget, 400);

            firstTarget = false;
            if (player != null && player.active && !player.dead)
            {
                npc.target = player.whoAmI;
                return(player);
            }
            else
            {
                return(Main.player[npc.target]);
            }
        }