public override void Draw(SpriteBatch sp) { sp.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, _camera.GetTransfromMatrix()); sp.Draw(_background, Vector2.Zero, Color.White); DrawObj(sp); _parManager.Draw(sp); _map1.Draw(sp); if (_gameIsPlaying) { /// show death and kill _deathCount.SetPosition(_camera.GetFollowPos() + new Vector2((int)(Consts.VIEWPORT_WIDTH / 2 - _deathCount.GetBoundingBox().Width), (int)(-Consts.VIEWPORT_HEIGHT / 2))); _deathCount.Draw(sp); _killCount.SetPosition(_camera.GetFollowPos() + new Vector2((int)(Consts.VIEWPORT_WIDTH / 2 - _deathCount.GetBoundingBox().Width * 2), (int)(-Consts.VIEWPORT_HEIGHT / 2))); //_killCount.SetPosition(_camera.GetFollowPos() + new Vector2((int)(Consts.VIEWPORT_WIDTH / 2 - _deathCount.GetBoundingBox().Width), (int)(-Consts.VIEWPORT_HEIGHT / 2 + _deathCount.GetBoundingBox().Height))); _killCount.Draw(sp); // death state effect Tank tank = (Tank)_network.GetMainTank(); if (!tank.IsAlive()) { //sp.DrawString(_font, ""+(int)delayTime, _camera.GetFollowPos(), Color.Red); sp.Draw(_deathBG, new Rectangle((int)_camera.GetFollowPos().X - 400, (int)_camera.GetFollowPos().Y - 300, 800, 600), Color.White); DrawDeathScreen(sp); } } else { this.DrawEndGame(sp); _okButton.SetPosition(_camera.GetFollowPos() + new Vector2(-_okButton.GetBoundingBox().Width / 2 + 20, _okButton.GetBoundingBox().Height)); _okButton.Draw(sp); } sp.End(); base.Draw(sp); }