public static IntersectsWith ( Entity entity1, string entity1Group, Entity entity2, string entity2Group, |
||
entity1 | Entity | |
entity1Group | string | |
entity2 | Entity | |
entity2Group | string | |
gameTime | ||
리턴 | bool |
/// <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)); }
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); } } }