private void drawSerialPortStatus(SpriteBatch spriteBatch) { var position = new Vector2(XnaDartsGame.Viewport.Width - _serialDisconnected.Width - 20, 20); if (!SerialManager.Instance().IsPortOpen) { spriteBatch.Draw(_serialDisconnected, position, Color.White); } else { _serialAnimation.Draw(spriteBatch, position, Vector2.Zero); } }
protected override void UnloadContent() { SerialManager.Instance().ClosePort(); }