Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 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());
 }
Esempio n. 3
0
 public Map()
 {
     Size          = new SizeF(DimensionsUtil.GetMapWidth(), DimensionsUtil.GetMapHeight());
     PaintballHits = new List <PaintballHit>();
 }