public GameScreen(Game game) { InitializeComponent(); this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true); this.Size = new Size((int)DimensionsUtil.GetMapWidth(), (int)DimensionsUtil.GetMapHeight()); _game = game; _game.InvalidateNeeded += _game_InvalidateNeeded; Application.Idle += Application_Idle; }
public static bool OffScreen(VideoPaintballCommon.MapObjects.MapObject mapObject) { return(mapObject.Location.X < 0 || mapObject.Location.Y < 0 || mapObject.Location.X > DimensionsUtil.GetMapWidth() || mapObject.Location.Y > DimensionsUtil.GetMapHeight()); }
public Map() { Size = new SizeF(DimensionsUtil.GetMapWidth(), DimensionsUtil.GetMapHeight()); PaintballHits = new List <PaintballHit>(); }