Esempio n. 1
0
        public static SerialManager Instance()
        {
            if (_instance == null)
            {
                _instance = new SerialManager();
            }

            return(_instance);
        }
Esempio n. 2
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);
            }
        }
Esempio n. 3
0
        public static SerialManager Instance()
        {
            if (_instance == null)
            {
                _instance = new SerialManager();
            }

            return _instance;
        }
Esempio n. 4
0
 protected override void UnloadContent()
 {
     SerialManager.Instance().ClosePort();
 }