コード例 #1
0
ファイル: quad.cs プロジェクト: NullandKale/OpenTKTests
 public quad(Texture2D texture)
 {
     pos        = new transform();
     components = new List <iComponent>();
     tex        = texture;
     height     = tex.height;
     width      = tex.width;
 }
コード例 #2
0
ファイル: quad.cs プロジェクト: NullandKale/OpenTKTests
 //Construct with single texture file
 public quad(string textureLocation)
 {
     pos        = new transform();
     components = new List <iComponent>();
     tex        = Managers.TextureManager.LoadTexture(textureLocation, false);
     height     = tex.height;
     width      = tex.width;
 }
コード例 #3
0
ファイル: quad.cs プロジェクト: NullandKale/OpenTKTests
 //Construct with texture atlas and Texture ID
 public quad(TextureAtlas tAtlas, int id)
 {
     pos        = new transform();
     components = new List <iComponent>();
     atlas      = tAtlas;
     texID      = id;
     tex        = tAtlas.getTile(id);
     height     = tAtlas.tilePixelHeight;
     width      = tAtlas.tilePixelWidth;
 }
コード例 #4
0
        public text(letter[] letters)
        {
            tiles      = new Tile[letters.Length];
            pos        = new transform();
            components = new List <iComponent>();

            for (int i = 0; i < letters.Length; i++)
            {
                tiles[i]        = new Tile();
                tiles[i].TexID  = (int)letters[i];
                tiles[i].tAtlas = Game.font;
            }

            tex = Managers.TextureManager.TextureFrom1DTileMap(tiles);
        }