public Actor GetOnlyObjectAt(Actor o, float dx, float dy, Type cls) { lock (this.pointQuery) { float px = dx * this.cellSize + this.cellSize / 2; float py = dy * this.cellSize + this.cellSize / 2; this.pointQuery.Init(px, py, cls); Object query = this.pointQuery; if (cls != null) { query = new CollisionClassQuery(cls, this.pointQuery); } return(this.GetOnlyIntersectingDown(new RectBox(px, py, 1, 1), (CollisionQuery)query, o)); } }
public Actor GetOnlyObjectAt(Actor o, float dx, float dy, Type cls) { lock (this.pointQuery) { float px = dx * this.cellSize + this.cellSize / 2; float py = dy * this.cellSize + this.cellSize / 2; this.pointQuery.Init(px, py, cls); object query = this.pointQuery; if (cls != null) { query = new CollisionClassQuery(cls, this.pointQuery); } return this.GetOnlyIntersectingDown(new RectBox(px, py, 1, 1), (CollisionQuery) query, o); } }