public Bar(Vector2 loc, int w, int h) { Location = new Point((int)loc.X, (int)loc.Y); Width = w; Height = h; Value = 1; rectPoly = new RectPoly(loc, Width, Height); ForeColor = Color.Blue; BackColor = Color.Wheat; }
public SolidButton(Vector2 minPos, float width, float height) { fontStr = "font1"; w = width; h = height; pos = minPos; rectPoly = new RectPoly(minPos, width, height); tex = ResourceManager.Resources["pixel"]; currColor = InactiveColor; MouseOver += new MouseOverEventHandler(Button_MouseOver); MouseLeftDown += new MouseClickEventHandler(SolidButton_MouseLeftDown); }
public IEnumerable <Actor> QueryPoint(Vector2 point) { RectPoly pRect = new RectPoly(point, 0, 0, 0); var tile = TileGrid[TileGrid.ScreenToUV(point)]; var potCollides = tile.ProximityActors.CloneToList(); var collideSet = new HashSet <Actor>(potCollides); foreach (var actor in collideSet) { if (CollisionTester.TestPointInside(point, actor.GetBoundingPoly())) { yield return(actor); } } }