Пример #1
0
        public List <Entity> CollideAll(BitTag tag)
        {
#if DEBUG
            if (Scene == null)
            {
                throw new Exception("Can't collide check an Entity against a tag list when it is not a member of a Scene");
            }
#endif
            return(Collide.All(this, Scene[tag]));
        }
Пример #2
0
        public List <Entity> CollideAll <T>(Vector2 at) where T : Entity
        {
#if DEBUG
            if (Scene == null)
            {
                throw new Exception("Can't collide check an Entity against tracked Entities when it is not a member of a Scene");
            }
            else if (!Scene.Tracker.Entities.ContainsKey(typeof(T)))
            {
                throw new Exception("Can't collide check an Entity against an untracked Entity type");
            }
#endif

            return(Collide.All(this, Scene.Tracker.Entities[typeof(T)], at));
        }