public static SerialManager Instance() { if (_instance == null) { _instance = new SerialManager(); } return(_instance); }
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); } }
public static SerialManager Instance() { if (_instance == null) { _instance = new SerialManager(); } return _instance; }
protected override void UnloadContent() { SerialManager.Instance().ClosePort(); }