示例#1
0
        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);
            }
        }
示例#2
0
 protected override void UnloadContent()
 {
     SerialManager.Instance().ClosePort();
 }