Exemplo n.º 1
0
 public CircleIntersectionState(Input input, TextureManager tex)
 {
     _input = input;
     Gl.glLineWidth(3);
     Gl.glDisable(Gl.GL_TEXTURE_2D);
     _spr.SetPosition(200, 0);
     _spr.SetHeight(200);
     _spr.SetWidth(200);
     _spr.Texture = tex.Get("face");
 }
Exemplo n.º 2
0
        public CharacterSprite CreateSprite(char c)
        {
            CharacterData charData = _characterData[c];
            Sprite sprite = new Sprite();
            sprite.Texture = _texture;

            // Setup UVs
            Point topLeft = new Point((float)charData.X / (float)_texture.Width,
                                        (float)charData.Y / (float)_texture.Height);
            Point bottomRight = new Point(topLeft.X + ((float)charData.Width / (float)_texture.Width),
                                          topLeft.Y + ((float)charData.Height / (float)_texture.Height));
            sprite.SetUVs(topLeft, bottomRight);
            sprite.SetWidth(charData.Width);
            sprite.SetHeight(charData.Height);
            sprite.SetColor(new Color(1, 1, 1, 1));

            return new CharacterSprite(sprite, charData);
        }
Exemplo n.º 3
0
        public CharacterSprite CreateSprite(char c)
        {
            CharacterData charData = _characterData[c];
            Sprite        sprite   = new Sprite();

            sprite.Texture = _texture;

            // Setup UVs
            Point topLeft = new Point((float)charData.X / (float)_texture.Width,
                                      (float)charData.Y / (float)_texture.Height);
            Point bottomRight = new Point(topLeft.X + ((float)charData.Width / (float)_texture.Width),
                                          topLeft.Y + ((float)charData.Height / (float)_texture.Height));

            sprite.SetUVs(topLeft, bottomRight);
            sprite.SetWidth(charData.Width);
            sprite.SetHeight(charData.Height);
            sprite.SetColor(new Color(1, 1, 1, 1));

            return(new CharacterSprite(sprite, charData));
        }