Ejemplo n.º 1
0
        public Entity CollideFirst(int tag, Vector2 at)
        {
#if DEBUG
            if (Scene == null)
            {
                throw new Exception("Can't collide check an Entity against tracked Entites when it is not a member of Scene");
            }
#endif
            return(Collide.First(this, Scene[tag], at));
        }
Ejemplo n.º 2
0
        public T CollideFirst <T>(Vector2 at) where T : Entity
        {
#if DEBUG
            if (Scene == null)
            {
                throw new Exception("Can't collide check an Entity against tracked Entites when it is not a member of Scene");
            }
            else if (Scene.Tracker.Entities.ContainsKey(typeof(T)) == false)
            {
                throw new Exception("Can't collide check an Entity against an untracked Entity type");
            }
#endif
            return(Collide.First(this, Scene.Tracker.Entities[typeof(T)], at) as T);
        }