Exemple #1
0
 public static void BlacklistCollisions(ColliderGroup a, ColliderGroup b)
 {
     if (a == null || b == null)
         throw new NullReferenceException();
     a.blacklist.Add(b);
     b.blacklist.Add(a);
 }
Exemple #2
0
 public static void BlacklistCollisions(ColliderGroup a, ColliderGroup b)
 {
     if (a == null || b == null)
     {
         throw new NullReferenceException();
     }
     a.blacklist.Add(b);
     b.blacklist.Add(a);
 }
Exemple #3
0
        public static ColliderGroup GetGroup(String name)
        {
            for (int i = 0; i < infos.Count; i++)
            {
                if (infos[i].Name == name)
                {
                    return(infos[i]);
                }
            }

            ColliderGroup g = new ColliderGroup(name);

            infos.Add(g);
            return(g);
        }
Exemple #4
0
        public static ColliderGroup GetGroup(String name)
        {
            for (int i = 0; i < infos.Count; i++)
            {
                if (infos[i].Name == name)
                    return infos[i];
            }

            ColliderGroup g = new ColliderGroup(name);
            infos.Add(g);
            return g;
        }
Exemple #5
0
 public static bool CanCollide(ColliderGroup a, ColliderGroup b)
 {
     return a.DoesCollideWith(b);
 }
Exemple #6
0
 public bool DoesCollideWith(ColliderGroup g)
 {
     return !blacklist.Contains(g);
 }
Exemple #7
0
 public static bool CanCollide(ColliderGroup a, ColliderGroup b)
 {
     return(a.DoesCollideWith(b));
 }
Exemple #8
0
 public bool DoesCollideWith(ColliderGroup g)
 {
     return(!blacklist.Contains(g));
 }