Exemple #1
0
        void g__EventOnDetected(surfCLR.SURF surf)
        {
            MySimulationServiceState s = new MySimulationServiceState();

            s._CS = surf.GetCS();
            s._CX = surf.GetCX();
            s._CY = surf.GetCY();

            _mainport.Post(new TurnRight(s));
        }
Exemple #2
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin();
            // TODO: Add your drawing code here
            if (_imageTex != null)
            {
                spriteBatch.Draw(_objectTex, new Rectangle(0, 0, _objectTex.Width, _objectTex.Height), Color.White);
                spriteBatch.Draw(_imageTex, new Rectangle(0, _objectTex.Height, _imageTex.Width, _imageTex.Height), Color.White);

                spriteBatch.DrawString(_Font1, string.Format("X({0}),Y({1}),S({2})", _surf.GetCX(), _surf.GetCY(), _surf.GetCS()), new Vector2(10, 10), Color.Blue);
            }


            spriteBatch.DrawString(_Font1, string.Format("{0}", _UpdateFrame++), new Vector2(10, 30), Color.Blue);

            spriteBatch.End();


            base.Draw(gameTime);
        }