worldToScreen() публичный Метод

Returns the screen position matching the given world position
public worldToScreen ( Vector2 pos ) : Vector2
pos Vector2 world position
Результат Vector2
Пример #1
0
        //Draws the sprite to the screen
        public virtual void Draw(SpriteBatch theSpriteBatch, Map map)
        {
            //Find the screen position for the texture
            Vector2 scrpos = map.worldToScreen(mPosition);

            //map.drawOnMap(theSpriteBatch, mSpriteTexture, mPosition, source);
            theSpriteBatch.Draw(mSpriteTexture, scrpos, source, Color.White);
        }
Пример #2
0
        //Draws the sprite to the screen
        public virtual void Draw(SpriteBatch theSpriteBatch, Map map)
        {
            //Find the screen position for the texture
            Vector2 scrpos = map.worldToScreen(mPosition);

            //map.drawOnMap(theSpriteBatch, mSpriteTexture, mPosition, source);
            theSpriteBatch.Draw(mSpriteTexture, scrpos, source, Color.White);
        }