Ejemplo n.º 1
0
        public ShipSnapShotManager(Ship ship)
        {
            _snapShotLifetime = TimeSpan.FromMilliseconds(Game.Instance.Configuration.gameConfig.DRAW_INTERVAL * 1.5);

            _snapShotTail = new BoundsSnapShot
            {
                Position = ship.MovementController.Position,
                At = GameTime.Now,
                Next = null
            };
            _snapShotHead = new BoundsSnapShot
            {
                Position = ship.MovementController.Position,
                At = GameTime.Now,
                Next = _snapShotTail
            };

            _ship = ship;
            _bounds = new Rectangle(Convert.ToInt32(_ship.MovementController.Position.X), Convert.ToInt32(_ship.MovementController.Position.Y), _ship.Width(), _ship.Height());
            _updateLock = new object();
        }
        public ShipSnapShotManager(Ship ship)
        {
            _snapShotLifetime = TimeSpan.FromMilliseconds(Game.Instance.Configuration.gameConfig.DRAW_INTERVAL * 1.5);

            _snapShotTail = new BoundsSnapShot
            {
                Position = ship.MovementController.Position,
                At       = GameTime.Now,
                Next     = null
            };
            _snapShotHead = new BoundsSnapShot
            {
                Position = ship.MovementController.Position,
                At       = GameTime.Now,
                Next     = _snapShotTail
            };

            _ship       = ship;
            _bounds     = new Rectangle(Convert.ToInt32(_ship.MovementController.Position.X), Convert.ToInt32(_ship.MovementController.Position.Y), _ship.Width(), _ship.Height());
            _updateLock = new object();
        }