public bool CanReceive(WifiComponent sender)
        {
            if (sender == null || sender.channel != channel || sender.TeamID != TeamID)
            {
                return(false);
            }
            if (Vector2.DistanceSquared(item.WorldPosition, sender.item.WorldPosition) > sender.range * sender.range)
            {
                return(false);
            }

            return(HasRequiredContainedItems(false));
        }
Exemple #2
0
        public bool CanReceive(WifiComponent sender)
        {
            if (!HasRequiredContainedItems(false))
            {
                return(false);
            }

            if (sender == null || sender.channel != channel)
            {
                return(false);
            }

            return(Vector2.Distance(item.WorldPosition, sender.item.WorldPosition) <= sender.Range);
        }
Exemple #3
0
        public bool CanReceive(WifiComponent sender)
        {
            if (sender == null || sender.channel != channel)
            {
                return(false);
            }

            if (sender.TeamID != TeamID && !AllowCrossTeamCommunication)
            {
                return(false);
            }

            if (Vector2.DistanceSquared(item.WorldPosition, sender.item.WorldPosition) > sender.range * sender.range)
            {
                return(false);
            }

            return(HasRequiredContainedItems(user: null, addMessage: false));
        }
Exemple #4
0
        public bool CanReceive(WifiComponent sender)
        {
            if (sender == null || sender.channel != channel)
            {
                return(false);
            }
            if (sender.TeamID == Character.TeamType.Team1 && TeamID == Character.TeamType.Team2)
            {
                return(false);
            }
            if (sender.TeamID == Character.TeamType.Team2 && TeamID == Character.TeamType.Team1)
            {
                return(false);
            }

            if (Vector2.DistanceSquared(item.WorldPosition, sender.item.WorldPosition) > sender.range * sender.range)
            {
                return(false);
            }

            return(HasRequiredContainedItems(user: null, addMessage: false));
        }