IntersectsWith() 공개 정적인 메소드

Helper method that wraps the static IntersectsWith Entity method. Assumes the state to check is the current drawable state.
public static IntersectsWith ( Entity entity1, string entity1Group, Entity entity2, string entity2Group, GameTime gameTime ) : bool
entity1 Entity
entity1Group string
entity2 Entity
entity2Group string
gameTime Microsoft.Xna.Framework.GameTime
리턴 bool
예제 #1
0
 /// <summary>
 /// Helper method that wraps the static IntersectsWith Entity method. Assumes the state to check is the current drawable state.
 /// </summary>
 public static bool IntersectsWith(Entity entity1, string entity1Group, Entity entity2, string entity2Group, GameTime gameTime)
 {
     return(Entity.IntersectsWith(
                entity1, entity1.CurrentDrawableState, entity1Group,
                entity2, entity2.CurrentDrawableState, entity2Group,
                gameTime));
 }
예제 #2
0
        public override void Update(GameTime gameTime, TeeEngine engine)
        {
            List <Entity> entitiesHit = engine.Collider.GetIntersectingEntites(this.CurrentBoundingBox);

            foreach (Entity entity in entitiesHit)
            {
                if (entity != this && Entity.IntersectsWith(this, null, entity, "Shadow", gameTime))
                {
                    OnMapZoneHit(entity, engine, gameTime);
                }
            }
        }